aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/debugger.cpp10
-rw-r--r--simon/debugger.cpp10
2 files changed, 8 insertions, 12 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index 008c991b03..a26d78e7da 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -597,13 +597,11 @@ bool ScummDebugger::Cmd_DebugLevel(int argc, const char **argv) {
else
DebugPrintf("Debugging is currently set at level %d\n", ConfMan.getInt("debuglevel"));
} else { // set level
- int level = atoi(argv[1]);
- ConfMan.set("debuglevel", level, Common::ConfigManager::kTransientDomain);
- gDebugLevel = ConfMan.getInt("debuglevel");
- if (level > 0) {
+ gDebugLevel = atoi(argv[1]);
+ if (gDebugLevel > 0) {
_vm->_debugMode = true;
- DebugPrintf("Debug level set to level %d\n", level);
- } else if (level == 0) {
+ DebugPrintf("Debug level set to level %d\n", gDebugLevel);
+ } else if (gDebugLevel == 0) {
_vm->_debugMode = false;
DebugPrintf("Debugging is now disabled\n");
} else
diff --git a/simon/debugger.cpp b/simon/debugger.cpp
index a27418132e..4d1a1b6d64 100644
--- a/simon/debugger.cpp
+++ b/simon/debugger.cpp
@@ -91,13 +91,11 @@ bool Debugger::Cmd_DebugLevel(int argc, const char **argv) {
else
DebugPrintf("Debugging is currently set at level %d\n", ConfMan.getInt("debuglevel"));
} else { // set level
- int level = atoi(argv[1]);
- ConfMan.set("debuglevel", level, Common::ConfigManager::kTransientDomain);
- gDebugLevel = ConfMan.getInt("debuglevel");
- if (level > 0 && level < 10) {
+ gDebugLevel = atoi(argv[1]);
+ if (gDebugLevel > 0 && gDebugLevel < 10) {
_vm->_debugMode = true;
- DebugPrintf("Debug level set to level %d\n", level);
- } else if (level == 0) {
+ DebugPrintf("Debug level set to level %d\n", gDebugLevel);
+ } else if (gDebugLevel == 0) {
_vm->_debugMode = false;
DebugPrintf("Debugging is now disabled\n");
} else