diff options
author | Max Horn | 2006-04-02 21:32:23 +0000 |
---|---|---|
committer | Max Horn | 2006-04-02 21:32:23 +0000 |
commit | 214c01d15d2f010a662504ac4d608f38f4ba4847 (patch) | |
tree | 410e03dd5769b883738647666e813e05f4199897 /base/main.cpp | |
parent | 29858dadcdf4dd277995cfa83ecdeac31316df46 (diff) | |
download | scummvm-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
Diffstat (limited to 'base/main.cpp')
-rw-r--r-- | base/main.cpp | 6 |
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 |