aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/gameDetector.cpp6
-rw-r--r--base/main.cpp6
2 files changed, 5 insertions, 7 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index 30d96c49f3..f4b8446798 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -566,12 +566,6 @@ void GameDetector::processSettings(Common::String &target, Common::StringMap &se
#endif
- if (settings.contains("debuglevel")) {
- gDebugLevel = (int)strtol(settings["debuglevel"].c_str(), 0, 10);
- printf("Debuglevel (from command line): %d\n", gDebugLevel);
- settings.erase("debuglevel"); // This option should not be passed to ConfMan.
- }
-
if (settings.contains("dump-scripts")) {
_dumpScripts = (settings["dump-scripts"] == "true");
settings.erase("dump-scripts"); // This option should not be passed to ConfMan.
diff --git a/base/main.cpp b/base/main.cpp
index d2856feb81..70adf7efd8 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -333,7 +333,11 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
ConfMan.loadDefaultConfigFile();
}
- if (ConfMan.hasKey("debuglevel"))
+ if (settings.contains("debuglevel")) {
+ gDebugLevel = (int)strtol(settings["debuglevel"].c_str(), 0, 10);
+ printf("Debuglevel (from command line): %d\n", gDebugLevel);
+ settings.erase("debuglevel"); // This option should not be passed to ConfMan.
+ } else if (ConfMan.hasKey("debuglevel"))
gDebugLevel = ConfMan.getInt("debuglevel");
// Update the config file