Ignore -psn* arguments on Mac OS X

Mac OS X adds an argument starting with "-psn" when launched using Finder, Dock,
or a terminal using open command and not specifying arguments.

It caused the opening videos to be skipped.

This change mimics SDL 1.2.
This commit is contained in:
Zack Middleton 2013-10-19 00:47:21 -05:00
parent cb153f2aaa
commit 983ebbb4a6

View file

@ -613,6 +613,12 @@ int main( int argc, char **argv )
// Set the initial time base
Sys_Milliseconds( );
#if MACOS_X
// This is passed if we are launched by double-clicking
if ( argc >= 2 && Q_strncmp ( argv[1], "-psn", 4 ) == 0 )
argc = 1;
#endif
Sys_ParseArgs( argc, argv );
Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) );
Sys_SetDefaultInstallPath( DEFAULT_BASEDIR );