[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.29,1.30

Felix Buenemann atmosfear at users.sourceforge.net
Sat May 5 22:13:39 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv23351

Modified Files:
	vo_sdl.c 
Log Message:
Fixed keyboard input handling and slowed down keyrepeat interval.


Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** vo_sdl.c	2001/04/26 22:16:57	1.29
--- vo_sdl.c	2001/05/05 20:13:37	1.30
***************
*** 302,307 ****
  	#endif	
  	
! 	/* Setup Keyrepeats */
! 	SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
  
  	/* get information about the graphics adapter */
--- 302,307 ----
  	#endif	
  	
! 	/* Setup Keyrepeats (500/30 are defaults) */
! 	SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, 100 /*SDL_DEFAULT_REPEAT_INTERVAL*/);
  
  	/* get information about the graphics adapter */
***************
*** 807,825 ****
  			/* graphics mode selection shortcuts */
  			case SDL_KEYDOWN:
- 				switch(event.key.keysym.sym) {
-                                 case SDLK_UP: mplayer_put_key(KEY_UP);break;
-                                 case SDLK_DOWN: mplayer_put_key(KEY_DOWN);break;
-                                 case SDLK_LEFT: mplayer_put_key(KEY_LEFT);break;
-                                 case SDLK_RIGHT: mplayer_put_key(KEY_RIGHT);break;
-                                 case SDLK_ASTERISK:
- 				case SDLK_KP_MULTIPLY:
- 				case SDLK_w: mplayer_put_key('*');break;
- 				case SDLK_SLASH:
- 				case SDLK_KP_DIVIDE:
-                                 case SDLK_s: mplayer_put_key('/');break;
- 				}
- 			break;	
- 			case SDL_KEYUP:	
  				keypressed = event.key.keysym.sym;
  
  				/* c key pressed. c cycles through available fullscreenmodes, if we have some */
--- 807,812 ----
  			/* graphics mode selection shortcuts */
  			case SDL_KEYDOWN:
  				keypressed = event.key.keysym.sym;
+ 				if(verbose > 1) printf("SDL: Key pressed: '%i'\n", keypressed);
  
  				/* c key pressed. c cycles through available fullscreenmodes, if we have some */
***************
*** 865,868 ****
--- 852,865 ----
  				case SDLK_PAGEUP: mplayer_put_key(KEY_PAGE_UP);break;
  				case SDLK_PAGEDOWN: mplayer_put_key(KEY_PAGE_DOWN);break;  
+                                 case SDLK_UP: mplayer_put_key(KEY_UP);break;
+                                 case SDLK_DOWN: mplayer_put_key(KEY_DOWN);break;
+                                 case SDLK_LEFT: mplayer_put_key(KEY_LEFT);break;
+                                 case SDLK_RIGHT: mplayer_put_key(KEY_RIGHT);break;
+                                 case SDLK_ASTERISK:
+ 				case SDLK_KP_MULTIPLY:
+ 				case SDLK_w: mplayer_put_key('*');break;
+ 				case SDLK_SLASH:
+ 				case SDLK_KP_DIVIDE:
+                                 case SDLK_s: mplayer_put_key('/');break;
  				default:
  					mplayer_put_key(keypressed);


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list