aboutsummaryrefslogtreecommitdiff
path: root/scumm/debugger.cpp
diff options
context:
space:
mode:
authorMax Horn2004-12-27 21:54:20 +0000
committerMax Horn2004-12-27 21:54:20 +0000
commitd138a880bf8498ac6facc66ac4dbc9cddbd33891 (patch)
tree59005954d09d577a659678e14cd47ca9740dc614 /scumm/debugger.cpp
parent2eb17ef32241618f41bede09eade8cac13d4bd05 (diff)
downloadscummvm-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 'scumm/debugger.cpp')
-rw-r--r--scumm/debugger.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index d99d20d81d..2a94c96b93 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -44,7 +44,7 @@ void CDECL debugC(int channel, const char *s, ...) {
// FIXME: Still spew all debug at -d9, for crashes in startup etc.
// Add setting from commandline ( / abstract channel interface)
- if (!(g_scumm->_debugFlags & channel) && (ConfMan.getInt("debuglevel") < 9))
+ if (!(g_scumm->_debugFlags & channel) && (gDebugLevel < 9))
return;
va_start(va, s);
@@ -596,6 +596,7 @@ bool ScummDebugger::Cmd_DebugLevel(int argc, const char **argv) {
} else { // set level
int level = atoi(argv[1]);
ConfMan.set("debuglevel", level, Common::ConfigManager::kTransientDomain);
+ gDebugLevel = ConfMan.getInt("debuglevel");
if (level > 0) {
_vm->_debugMode = true;
DebugPrintf("Debug level set to level %d\n", level);