aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp6
1 files changed, 5 insertions, 1 deletions
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