aboutsummaryrefslogtreecommitdiff
path: root/base/commandLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r--base/commandLine.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 19702ea36d..a9116bf5f2 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -100,8 +100,9 @@ static const char HELP_STRING[] =
" -u, --dump-scripts Enable script dumping if a directory called 'dumps'\n"
" exists in the current directory\n"
"\n"
- " --cdrom=NUM CD drive to play CD audio from (default: 0 = first\n"
- " drive)\n"
+ " --cdrom=DRIVE CD drive to play CD audio from; can either be a\n"
+ " drive, path, or numeric index (default: 0 = best\n"
+ " choice drive)\n"
" --joystick[=NUM] Enable joystick input (default: 0 = first joystick)\n"
" --platform=WORD Specify platform of game (allowed values: 2gs, 3do,\n"
" acorn, amiga, atari, c64, fmtowns, nes, mac, pc, pc98,\n"
@@ -373,6 +374,12 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
// We defer checking whether this is a valid target to a later point.
return s;
} else {
+ // On MacOS X prior to 10.9 the OS is sometimes adding a -psn_X_XXXXXX argument (where X are digits)
+ // to pass the process serial number. We need to ignore it to avoid an error.
+#ifdef MACOSX
+ if (strncmp(s, "-psn_", 5) == 0)
+ continue;
+#endif
bool isLongCmd = (s[0] == '-' && s[1] == '-');