diff libvo/vo_xmga.c @ 922:db06ae8967eb

Centralized and cleaned up X11 connecting, fixed remote X11 playing, -display option for mplayer. SHOULD BE TESTED.
author lgb
date Thu, 31 May 2001 22:32:58 +0000
parents 108ea5157cbc
children 2098be9cb19b
line wrap: on
line diff
--- a/libvo/vo_xmga.c	Thu May 31 18:08:24 2001 +0000
+++ b/libvo/vo_xmga.c	Thu May 31 22:32:58 2001 +0000
@@ -62,7 +62,7 @@
  ""
 };
 
-static Display              * mDisplay;
+//static Display              * mDisplay;
 static Window                 mWindow;
 static GC                     mGC;
 static XGCValues              wGCV;
@@ -225,17 +225,7 @@
 
  if ( X_already_started ) return -1;
 
- vo_init();
-
- if ( getenv( "DISPLAY" ) ) name=getenv( "DISPLAY" );
- mDisplay=XOpenDisplay(name);
- if ( mDisplay == NULL )
-  {
-   printf( "Can not open X11 display\n" );
-   return -1;
-  }
-
- mScreen=DefaultScreen( mDisplay );
+ if (!vo_init()) return -1;
 
  mvWidth=width; mvHeight=height;