changeset 9669:4d9f067a80da

pass correct key for ESCAPE, bug noticed by Vladimir Mosgalin <mosgalin@VM10124.spb.edu> and moved SDL_ShowCursor from the check_keys() to uninit() (by me)
author alex
date Sun, 23 Mar 2003 17:35:26 +0000
parents 0dd456513950
children 88e4f274df48
files libvo/vo_sdl.c
diffstat 1 files changed, 7 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_sdl.c	Sun Mar 23 17:14:28 2003 +0000
+++ b/libvo/vo_sdl.c	Sun Mar 23 17:35:26 2003 +0000
@@ -540,6 +540,9 @@
 {
 	struct sdl_priv_s *priv = &sdl_priv;
 
+	if (priv->fullmode)
+	    SDL_ShowCursor(1);
+
 	/* Cleanup YUV Overlay structure */
 	if (priv->overlay) {
 		SDL_FreeYUVOverlay(priv->overlay);
@@ -1250,15 +1253,9 @@
 				}	
 
                                 else switch(keypressed){
-				case SDLK_RETURN:
-					SDL_ShowCursor(1);
-					mplayer_put_key(KEY_ENTER);
-				break;
-                                case SDLK_ESCAPE:
-				case SDLK_q:
-					SDL_ShowCursor(1);
-					mplayer_put_key('q');
-				break;
+				case SDLK_RETURN: mplayer_put_key(KEY_ENTER);break;
+                                case SDLK_ESCAPE: mplayer_put_key(KEY_ESC);break;
+				case SDLK_q: mplayer_put_key('q');break;
                                 /*case SDLK_o: mplayer_put_key('o');break;
                                 case SDLK_SPACE: mplayer_put_key(' ');break;
                                 case SDLK_p: mplayer_put_key('p');break;*/
@@ -1298,10 +1295,7 @@
                                 }
                                 
 				break;
-				case SDL_QUIT:
-					SDL_ShowCursor(1);
-					mplayer_put_key('q');
-				break;
+				case SDL_QUIT: mplayer_put_key('q');break;
 		}
 	}
 }