aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-04-02 21:32:23 +0000
committerMax Horn2006-04-02 21:32:23 +0000
commit214c01d15d2f010a662504ac4d608f38f4ba4847 (patch)
tree410e03dd5769b883738647666e813e05f4199897
parent29858dadcdf4dd277995cfa83ecdeac31316df46 (diff)
downloadscummvm-rg350-214c01d15d2f010a662504ac4d608f38f4ba4847.tar.gz
scummvm-rg350-214c01d15d2f010a662504ac4d608f38f4ba4847.tar.bz2
scummvm-rg350-214c01d15d2f010a662504ac4d608f38f4ba4847.zip
Set gDebugLevel in a single unified spot, instead of two different places
svn-id: r21571
-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