From 983ebbb4a67d577be3c2dca194880524a3503e9b Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 19 Oct 2013 00:47:21 -0500 Subject: [PATCH] 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. --- code/sys/sys_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c index 43d9bd94..9cb175d6 100644 --- a/code/sys/sys_main.c +++ b/code/sys/sys_main.c @@ -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 );