From 2681344b097ca3035c3b602c83db0ee1ad71a0cb Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 23 Mar 2003 17:35:26 +0000 Subject: [PATCH] pass correct key for ESCAPE, bug noticed by Vladimir Mosgalin and moved SDL_ShowCursor from the check_keys() to uninit() (by me) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9670 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_sdl.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index d31d3599eb..69d0ea5869 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -540,6 +540,9 @@ static int sdl_close (void) { 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 @@ static void check_events (void) } 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 @@ static void check_events (void) } break; - case SDL_QUIT: - SDL_ShowCursor(1); - mplayer_put_key('q'); - break; + case SDL_QUIT: mplayer_put_key('q');break; } } }