aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorThierry Crozat2017-02-06 21:54:50 +0000
committerThierry Crozat2017-02-06 21:54:50 +0000
commit7caeb6035067126f431bd1699ad47021bbfeda1b (patch)
tree7e96415c745e618734465c54ebcaeaedd61478cf /base
parent5da09383dcead28ada62ff5a6ea4f1bf18e8401a (diff)
downloadscummvm-rg350-7caeb6035067126f431bd1699ad47021bbfeda1b.tar.gz
scummvm-rg350-7caeb6035067126f431bd1699ad47021bbfeda1b.tar.bz2
scummvm-rg350-7caeb6035067126f431bd1699ad47021bbfeda1b.zip
BASE: Ignore -NSDocumentRevisionDebugMode command line argument on OS X
This is automatically added by Xcode when not toggling off the "Allow debugging when using document Versions Browser". Since this is on by default, and to avoid everybody having to google it, I have decided to just ignore it on OS X.
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 2d7b9f2d9f..51fee811d6 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -386,9 +386,15 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
} 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.
+ // When using XCode it also adds -NSDocumentRevisionsDebugMode YES argument if XCode option
+ // "Allow debugging when using document Versions Browser" is on (which is the default).
#ifdef MACOSX
if (strncmp(s, "-psn_", 5) == 0)
continue;
+ if (strcmp(s, "-NSDocumentRevisionsDebugMode") == 0) {
+ ++i; // Also skip the YES that follows
+ continue;
+ }
#endif
bool isLongCmd = (s[0] == '-' && s[1] == '-');