[MPlayer-cvslog] r33552 - in trunk: gui/wm/ws.c help/help_mp-bg.h help/help_mp-cs.h help/help_mp-de.h help/help_mp-en.h help/help_mp-es.h help/help_mp-fr.h help/help_mp-hu.h help/help_mp-it.h help/help_mp-pl.h help...

ib subversion at mplayerhq.hu
Fri Jun 3 16:35:47 CEST 2011


Author: ib
Date: Fri Jun  3 16:35:44 2011
New Revision: 33552

Log:
Remove useless code.

mDisplay is always set, otherwise the GUI wouldn't have been called.
Thus, there is neither a need to call XOpenDisplay() nor to check for error.

Modified:
   trunk/gui/wm/ws.c

Changes in other areas also in this revision:
Modified:
   trunk/help/help_mp-bg.h
   trunk/help/help_mp-cs.h
   trunk/help/help_mp-de.h
   trunk/help/help_mp-en.h
   trunk/help/help_mp-es.h
   trunk/help/help_mp-fr.h
   trunk/help/help_mp-hu.h
   trunk/help/help_mp-it.h
   trunk/help/help_mp-pl.h
   trunk/help/help_mp-ru.h
   trunk/help/help_mp-tr.h
   trunk/help/help_mp-uk.h
   trunk/help/help_mp-zh_CN.h
   trunk/help/help_mp-zh_TW.h

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Fri Jun  3 16:31:13 2011	(r33551)
+++ trunk/gui/wm/ws.c	Fri Jun  3 16:35:44 2011	(r33552)
@@ -202,18 +202,8 @@ void wsXInit( Display* mDisplay )
  int    eventbase;
  int    errorbase;
 
-if(mDisplay){
+ // NOTE TO MYSELF: Use global mDisplay, get rid of wsDisplay.
  wsDisplay=mDisplay;
-} else {
- char * DisplayName = ":0.0";
- if ( getenv( "DISPLAY" ) ) DisplayName=getenv( "DISPLAY" );
- wsDisplay=XOpenDisplay( DisplayName );
- if ( !wsDisplay )
-  {
-   mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_WS_CouldNotOpenDisplay );
-   guiExit( EXIT_ERROR );
-  }
-}
 
  XSetErrorHandler( wsErrorHandler );
 


More information about the MPlayer-cvslog mailing list