[MPlayer-cvslog] r18944 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Sat Jul 8 13:03:18 CEST 2006


Author: reimar
Date: Sat Jul  8 13:03:18 2006
New Revision: 18944

Modified:
   trunk/mplayer.c

Log:
Change use_gui detection to accept also filenames only containing
gmplayer, like "gmplayer.exe", "gmplayer_old" etc.
Also removes (somewhat broken) WIN32 special-case


Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Sat Jul  8 13:03:18 2006
@@ -2623,16 +2623,16 @@
   tv_param_immediate = 1;
 #endif
 
-#if defined(WIN32) && defined(HAVE_NEW_GUI)
-  char *cmdline = GetCommandLine();
-  if(!strstr(cmdline, "-slave"))
-    use_gui=1;
-#else
   if ( argv[0] )
-    if(!strcmp(argv[0],"gmplayer") ||
-      (strrchr(argv[0],'/') && !strcmp(strrchr(argv[0],'/'),"/gmplayer") ) )
+  {
+    char *base = strrchr(argv[0], '/');
+    if (!base)
+      base = strrchr(argv[0], '\\');
+    if (!base)
+      base = argv[0];
+    if(strstr(base, "gmplayer"))
           use_gui=1;
-#endif
+  }
 
     mconfig = m_config_new();
     m_config_register_options(mconfig,mplayer_opts);



More information about the MPlayer-cvslog mailing list