]> git.mxchange.org Git - flightgear.git/commitdiff
Ignore -psn_ argument if launched as a GUI app on Mac.
authorJames Turner <zakalawe@mac.com>
Mon, 22 Nov 2010 23:28:12 +0000 (23:28 +0000)
committerJames Turner <zakalawe@mac.com>
Mon, 22 Nov 2010 23:28:12 +0000 (23:28 +0000)
src/Main/options.cxx

index 1b5d7325b1f0010b2b0edc80d3cd5d560af0a697..5604e2f9859e5cb0bcb249960d29c5e8b9c3b29a 100644 (file)
@@ -1552,6 +1552,10 @@ parse_option (const string& arg)
             SG_LOG( SG_GENERAL, SG_ALERT, "Bad property assignment: " << arg );
             return FG_OPTIONS_ERROR;
         }
+    } else if ( arg.find("-psn_") == 0) {
+    // on Mac, when launched from the GUI, we are passed the ProcessSerialNumber
+    // as an argument (and no others). Silently ignore the argument here.
+        return FG_OPTIONS_OK;
     } else if ( arg.find( "--" ) == 0 ) {
         size_t pos = arg.find( '=' );
         string arg_name, arg_value;