[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.115,1.116

Reimar Döffinger CVS syncmail at mplayerhq.hu
Fri Jul 9 20:59:58 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv2629

Modified Files:
	vo_sdl.c 
Log Message:
fix for xscreensaver disabling


Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- vo_sdl.c	26 Jun 2004 11:16:55 -0000	1.115
+++ vo_sdl.c	9 Jul 2004 18:59:55 -0000	1.116
@@ -1575,13 +1575,10 @@
 uninit(void)
 {
 #ifdef HAVE_X11
-	static Display *XDisplay;
-    XDisplay = XOpenDisplay(NULL);
-    if(XDisplay) {
+    struct sdl_priv_s *priv = &sdl_priv;
+    if(priv->X) {
 		if(verbose) printf("SDL: activating XScreensaver/DPMS\n");
-
-		saver_on(XDisplay);
-		XCloseDisplay(XDisplay);
+		vo_x11_uninit();
 	}
 #endif
 	sdl_close();
@@ -1597,10 +1594,6 @@
 static uint32_t preinit(const char *arg)
 {
     struct sdl_priv_s *priv = &sdl_priv;
-#ifdef HAVE_X11	
-    static Display *XDisplay;
-    static int XScreen;
-#endif
 
     priv->rgbsurface = NULL;
     priv->overlay = NULL;
@@ -1635,16 +1628,12 @@
 
     priv->X = 0;
 #ifdef HAVE_X11
-    XDisplay = XOpenDisplay(NULL);
-    if(XDisplay) {
+    if(vo_init()) {
 		if(verbose) printf("SDL: deactivating XScreensaver/DPMS\n");
-		XScreen = DefaultScreen(XDisplay);
-		priv->XWidth = DisplayWidth(XDisplay, XScreen);
-		priv->XHeight = DisplayHeight(XDisplay, XScreen);
+		priv->XWidth = vo_screenwidth;
+		priv->XHeight = vo_screenheight;
 		priv->X = 1;
 		if(verbose) printf("SDL: X11 Resolution %ix%i\n", priv->XWidth, priv->XHeight);
-		saver_off(XDisplay);
-		XCloseDisplay(XDisplay);
 	}
 #endif
 




More information about the MPlayer-cvslog mailing list