diff options
-rw-r--r-- | common/gameDetector.cpp | 12 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index 2554323068..2f494776c3 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -200,7 +200,7 @@ GameDetector::GameDetector() _amiga = false; _talkSpeed = 60; - _debugLevel = 1; + _debugLevel = 0; _debugMode = 0; _noSubtitles = false; _bootParam = 0; @@ -278,11 +278,19 @@ void GameDetector::updateconfig() _sfx_volume = g_config->getInt("sfx_volume", _sfx_volume); + _debugLevel = g_config->getInt("debuglevel", _debugLevel); + if (_debugLevel > 0) { + _debugMode = true; + debug(1, "Debuglevel (from config): %d", _debugLevel); + } + // We use strtol for the tempo to allow it to be specified in hex. if ((val = g_config->get("tempo"))) _gameTempo = strtol(val, NULL, 0); _talkSpeed = g_config->getInt("talkspeed", _talkSpeed); + + } void GameDetector::list_games() @@ -350,7 +358,7 @@ void GameDetector::parseCommandLine(int argc, char **argv) HANDLE_OPT_OPTION(); if (option != NULL) _debugLevel = atoi(option); - debug(1,"Debugmode (level %d) on", _debugLevel); + debug(1,"Debuglevel (from command line): %d", _debugLevel); break; case 'e': HANDLE_OPTION(); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index a2e8acd257..e5e2221ce4 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -49,6 +49,7 @@ Scumm *g_scumm = 0; ScummDebugger g_debugger; extern NewGui *g_gui; +extern uint16 _debugLevel; Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { @@ -79,6 +80,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) g_scumm = this; _debugMode = detector->_debugMode; + _debugLevel = detector->_debugLevel; _bootParam = detector->_bootParam; _exe_name = (char*)detector->_gameRealName.c_str(); _game_name = (char*)detector->_gameFileName.c_str(); |