mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Change use_gui detection to accept also filenames only containing
gmplayer, like "gmplayer.exe", "gmplayer_old" etc. Also removes (somewhat broken) WIN32 special-case git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18944 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1b51da21f5
commit
d121c0061b
16
mplayer.c
16
mplayer.c
@ -2623,16 +2623,16 @@ int gui_no_filename=0;
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user