[Mplayer-cvslog] CVS: main/libvo vo_gl.c,1.28,1.29 vo_gl2.c,1.21,1.22 vo_sdl.c,1.88,1.89 vo_xv.c,1.113,1.114 x11_common.c,1.95,1.96

Alex Beregszaszi alex at mplayerhq.hu
Wed Aug 28 17:56:01 CEST 2002


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

Modified Files:
	vo_gl.c vo_gl2.c vo_sdl.c vo_xv.c x11_common.c 
Log Message:
removed old input code

Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- vo_gl.c	9 Aug 2002 17:43:49 -0000	1.28
+++ vo_gl.c	28 Aug 2002 15:55:58 -0000	1.29
@@ -205,9 +205,7 @@
 
 	//XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!!
 	vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask
-#ifdef HAVE_NEW_INPUT
 		     | ButtonPressMask | ButtonReleaseMask
-#endif
         );
 
 //  printf("Window setup ok\n");

Index: vo_gl2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- vo_gl2.c	9 Aug 2002 17:43:49 -0000	1.21
+++ vo_gl2.c	28 Aug 2002 15:55:58 -0000	1.22
@@ -709,9 +709,7 @@
 
 	//XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!!
         vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask
-#ifdef HAVE_NEW_INPUT
 		 | ButtonPressMask | ButtonReleaseMask
-#endif
         );
 
   glVersion = glGetString(GL_VERSION);

Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- vo_sdl.c	9 Aug 2002 21:30:21 -0000	1.88
+++ vo_sdl.c	28 Aug 2002 15:55:58 -0000	1.89
@@ -121,10 +121,8 @@
 #include "x11_common.h"
 #endif
 
-#ifdef HAVE_NEW_INPUT
 #include "../input/input.h"
 #include "../input/mouse.h"
-#endif
 
 LIBVO_EXTERN(sdl)
 
@@ -490,6 +488,9 @@
 		//}	
 	#endif	
 	
+	if (vo_doublebuffering)
+	    priv->sdlflags |= SDL_DOUBLEBUF;
+	
 	/* Setup Keyrepeats (500/30 are defaults) */
 	SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, 100 /*SDL_DEFAULT_REPEAT_INTERVAL*/);
 
@@ -1208,50 +1209,14 @@
 			break;
 			
 			case SDL_MOUSEBUTTONDOWN:
-#ifdef HAVE_NEW_INPUT
 				if(event.button.button == 4 || event.button.button == 5)
 					mplayer_put_key(MOUSE_BASE+event.button.button-1);
 				else
 					mplayer_put_key((MOUSE_BASE+event.button.button-1) | MP_KEY_DOWN);
-#else
-				switch(event.button.button) {
-					case 1: modifiers |= 1; break;
-					case 2: modifiers |= 2; break;
-					case 3: modifiers |= 4; break;
-					case 4:	/* wheel up */
-						if ((modifiers & 1))
-							mplayer_put_key(KEY_LEFT);
-						else if ((modifiers & 2))
-							mplayer_put_key('/');
-						else if ((modifiers & 4))
-							mplayer_put_key(KEY_PAGE_DOWN);
-						else
-							mplayer_put_key(KEY_DOWN);
-						break;
-					case 5:	/* wheel down */
-						if ((modifiers & 1))
-							mplayer_put_key(KEY_RIGHT);
-						else if ((modifiers & 2))
-							mplayer_put_key('*');
-						else if ((modifiers & 4))
-							mplayer_put_key(KEY_PAGE_UP);
-						else
-							mplayer_put_key(KEY_UP);
-						break;
-				}
-#endif
 				break;			    
 		
 			case SDL_MOUSEBUTTONUP:
-#ifdef HAVE_NEW_INPUT
 				mplayer_put_key(MOUSE_BASE+event.button.button-1);
-#else
-				switch(event.button.button) {
-					case 1: modifiers &= ~1; break;
-					case 2: modifiers &= ~2; break;
-					case 3: modifiers &= ~4; break;
-				}
-#endif
 				break;
 	
 			/* graphics mode selection shortcuts */

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- vo_xv.c	21 Aug 2002 21:23:26 -0000	1.113
+++ vo_xv.c	28 Aug 2002 15:55:58 -0000	1.114
@@ -397,9 +397,7 @@
 
         vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PropertyChangeMask |
 	((WinID==0) ? 0 : (PointerMotionMask
-#ifdef HAVE_NEW_INPUT
 		| ButtonPressMask | ButtonReleaseMask
-#endif
 	  )));
         XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint);
         XSetWMNormalHints( mDisplay,vo_window,&hint );

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- x11_common.c	21 Aug 2002 21:24:23 -0000	1.95
+++ x11_common.c	28 Aug 2002 15:55:58 -0000	1.96
@@ -32,10 +32,8 @@
 #include <X11/extensions/xf86vmode.h>
 #endif
 
-#ifdef HAVE_NEW_INPUT
 #include "../input/input.h"
 #include "../input/mouse.h"
-#endif
 
 #ifdef HAVE_NEW_GUI
 #include "../Gui/interface.h"
@@ -366,6 +364,7 @@
 
  vo_wm_type=vo_wm_detect();
 
+ saver_off(mDisplay);
  return 1;
 }
 
@@ -532,6 +531,7 @@
 
 void vo_x11_uninit()
 {
+    saver_on(mDisplay);
     if(vo_window!=None) vo_showcursor( mDisplay,vo_window );
 
 #ifdef HAVE_NEW_GUI
@@ -624,7 +624,6 @@
       case MotionNotify:
            if ( vo_mouse_autohide ) { vo_showcursor( mydisplay,vo_window ); vo_mouse_counter=vo_mouse_timer_const; }
            break;
-#ifdef HAVE_NEW_INPUT
       case ButtonPress:
            if ( vo_mouse_autohide ) { vo_showcursor( mydisplay,vo_window ); vo_mouse_counter=vo_mouse_timer_const; }
            // Ignore mouse whell press event
@@ -646,7 +645,6 @@
 	   #endif
            mplayer_put_key(MOUSE_BTN0+Event.xbutton.button-1);
            break;
-#endif
       case PropertyNotify: 
     	   {
 	    char * name = XGetAtomName( mydisplay,Event.xproperty.atom );




More information about the MPlayer-cvslog mailing list