From 06b38d40f5da3793726e0ebf0358d7a4d261ef49 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 19 Oct 2013 00:47:21 -0500 Subject: 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. --- src/sys/sys_main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/sys') diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index f58766f1..41045cd4 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -616,6 +616,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 ); -- cgit