Mercurial > mplayer.hg
comparison libvo/vo_sdl.c @ 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 | edfe34c5405d |
children | 150d1ef4204d |
comparison
equal
deleted
inserted
replaced
9668:0dd456513950 | 9669:4d9f067a80da |
---|---|
537 **/ | 537 **/ |
538 | 538 |
539 static int sdl_close (void) | 539 static int sdl_close (void) |
540 { | 540 { |
541 struct sdl_priv_s *priv = &sdl_priv; | 541 struct sdl_priv_s *priv = &sdl_priv; |
542 | |
543 if (priv->fullmode) | |
544 SDL_ShowCursor(1); | |
542 | 545 |
543 /* Cleanup YUV Overlay structure */ | 546 /* Cleanup YUV Overlay structure */ |
544 if (priv->overlay) { | 547 if (priv->overlay) { |
545 SDL_FreeYUVOverlay(priv->overlay); | 548 SDL_FreeYUVOverlay(priv->overlay); |
546 priv->overlay=NULL; | 549 priv->overlay=NULL; |
1248 if(verbose > 1) printf("SDL: Double size\n"); | 1251 if(verbose > 1) printf("SDL: Double size\n"); |
1249 } | 1252 } |
1250 } | 1253 } |
1251 | 1254 |
1252 else switch(keypressed){ | 1255 else switch(keypressed){ |
1253 case SDLK_RETURN: | 1256 case SDLK_RETURN: mplayer_put_key(KEY_ENTER);break; |
1254 SDL_ShowCursor(1); | 1257 case SDLK_ESCAPE: mplayer_put_key(KEY_ESC);break; |
1255 mplayer_put_key(KEY_ENTER); | 1258 case SDLK_q: mplayer_put_key('q');break; |
1256 break; | |
1257 case SDLK_ESCAPE: | |
1258 case SDLK_q: | |
1259 SDL_ShowCursor(1); | |
1260 mplayer_put_key('q'); | |
1261 break; | |
1262 /*case SDLK_o: mplayer_put_key('o');break; | 1259 /*case SDLK_o: mplayer_put_key('o');break; |
1263 case SDLK_SPACE: mplayer_put_key(' ');break; | 1260 case SDLK_SPACE: mplayer_put_key(' ');break; |
1264 case SDLK_p: mplayer_put_key('p');break;*/ | 1261 case SDLK_p: mplayer_put_key('p');break;*/ |
1265 case SDLK_7: mplayer_put_key(shift_key?'/':'7'); | 1262 case SDLK_7: mplayer_put_key(shift_key?'/':'7'); |
1266 case SDLK_PLUS: mplayer_put_key(shift_key?'*':'+'); | 1263 case SDLK_PLUS: mplayer_put_key(shift_key?'*':'+'); |
1296 //printf("got scancode: %d keysym: %d mod: %d %d\n", event.key.keysym.scancode, keypressed, event.key.keysym.mod); | 1293 //printf("got scancode: %d keysym: %d mod: %d %d\n", event.key.keysym.scancode, keypressed, event.key.keysym.mod); |
1297 mplayer_put_key(keypressed); | 1294 mplayer_put_key(keypressed); |
1298 } | 1295 } |
1299 | 1296 |
1300 break; | 1297 break; |
1301 case SDL_QUIT: | 1298 case SDL_QUIT: mplayer_put_key('q');break; |
1302 SDL_ShowCursor(1); | |
1303 mplayer_put_key('q'); | |
1304 break; | |
1305 } | 1299 } |
1306 } | 1300 } |
1307 } | 1301 } |
1308 #undef shift_key | 1302 #undef shift_key |
1309 | 1303 |