[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.63,1.64

Atmosfear atmos4 at mplayer.dev.hu
Mon Feb 4 20:14:43 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv22953/libvo

Modified Files:
	vo_sdl.c 
Log Message:
Add playlist keys (some missing?!) and add some shift handlers to allow keys to work with german keyboards.


Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- vo_sdl.c	4 Feb 2002 18:18:46 -0000	1.63
+++ vo_sdl.c	4 Feb 2002 19:14:40 -0000	1.64
@@ -327,9 +327,9 @@
 {
 	struct sdl_priv_s *priv = &sdl_priv;
 	const SDL_VideoInfo *vidInfo = NULL;
-	static int opened = 0;
+	/*static int opened = 0;
 	
-	/*if (opened)
+	if (opened)
 	    return 0;
 	opened = 1;*/
 
@@ -1018,7 +1018,8 @@
 
 #include "../linux/keycodes.h"
 extern void mplayer_put_key(int code);
- 
+
+#define shift_key (event.key.keysym.mod==(KMOD_LSHIFT||KMOD_RSHIFT)) 
 static void check_events (void)
 {
 	struct sdl_priv_s *priv = &sdl_priv;
@@ -1051,6 +1052,8 @@
                                 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_LESS: mplayer_put_key(shift_key?'>':'<'); break;
+                                case SDLK_GREATER: mplayer_put_key('>'); break;
                                 case SDLK_ASTERISK:
 				case SDLK_KP_MULTIPLY:
 				case SDLK_w: mplayer_put_key('*'); break;
@@ -1120,7 +1123,8 @@
                                 /*case SDLK_o: mplayer_put_key('o');break;
                                 case SDLK_SPACE: mplayer_put_key(' ');break;
                                 case SDLK_p: mplayer_put_key('p');break;*/
-                                case SDLK_PLUS:
+				case SDLK_7: mplayer_put_key(shift_key?'/':'7');
+                                case SDLK_PLUS: mplayer_put_key(shift_key?'*':'+');
                                 case SDLK_KP_PLUS: mplayer_put_key('+');break;
                                 case SDLK_MINUS:
                                 case SDLK_KP_MINUS: mplayer_put_key('-');break;
@@ -1144,6 +1148,8 @@
                                 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_LESS: mplayer_put_key(shift_key?'>':'<'); break;
+                                case SDLK_GREATER: mplayer_put_key('>'); break;
                                 case SDLK_ASTERISK:
 				case SDLK_KP_MULTIPLY:
 				case SDLK_w: mplayer_put_key('*');break;
@@ -1152,6 +1158,7 @@
                                 case SDLK_s: mplayer_put_key('/');break;
 #endif				
 				default:
+					//printf("got scancode: %d keysym: %d mod: %d %d\n", event.key.keysym.scancode, keypressed, event.key.keysym.mod);
 					mplayer_put_key(keypressed);
                                 }
                                 
@@ -1163,6 +1170,7 @@
 		}
 	}
 }
+#undef shift_key
 
 static void draw_osd(void)
 {	struct sdl_priv_s *priv = &sdl_priv;




More information about the MPlayer-cvslog mailing list