diff options
author | Max Horn | 2004-12-27 21:54:20 +0000 |
---|---|---|
committer | Max Horn | 2004-12-27 21:54:20 +0000 |
commit | d138a880bf8498ac6facc66ac4dbc9cddbd33891 (patch) | |
tree | 59005954d09d577a659678e14cd47ca9740dc614 /base/gameDetector.cpp | |
parent | 2eb17ef32241618f41bede09eade8cac13d4bd05 (diff) | |
download | scummvm-rg350-d138a880bf8498ac6facc66ac4dbc9cddbd33891.tar.gz scummvm-rg350-d138a880bf8498ac6facc66ac4dbc9cddbd33891.tar.bz2 scummvm-rg350-d138a880bf8498ac6facc66ac4dbc9cddbd33891.zip |
Fix for bug #1091748 (DIG: Starting new games takes a long time); turns out querying the debuglevel from the config-manager very often is too slow
svn-id: r16345
Diffstat (limited to 'base/gameDetector.cpp')
-rw-r--r-- | base/gameDetector.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp index bbee79d7f2..31b619fa55 100644 --- a/base/gameDetector.cpp +++ b/base/gameDetector.cpp @@ -333,9 +333,9 @@ void GameDetector::parseCommandLine(int argc, char **argv) { DO_OPTION_OPT('d', "debuglevel") if (option != NULL) ConfMan.set("debuglevel", (int)strtol(option, 0, 10), kTransientDomain); - int debuglevel = ConfMan.getInt("debuglevel"); - if (debuglevel) - printf("Debuglevel (from command line): %d\n", debuglevel); + gDebugLevel = ConfMan.getInt("debuglevel"); + if (gDebugLevel) + printf("Debuglevel (from command line): %d\n", gDebugLevel); else printf("Debuglevel (from command line): 0 - Game only\n"); END_OPTION @@ -510,6 +510,7 @@ ShowHelpAndExit: void GameDetector::setTarget(const String &name) { _targetName = name; ConfMan.setActiveDomain(name); + gDebugLevel = ConfMan.getInt("debuglevel"); } bool GameDetector::detectGame() { |