diff options
author | Travis Howell | 2002-12-21 00:27:10 +0000 |
---|---|---|
committer | Travis Howell | 2002-12-21 00:27:10 +0000 |
commit | 368a9917f7c05a2fbb780df7634b00e57aa51ab3 (patch) | |
tree | 59799f381e6b333415ea68e27327c4763c3b3265 | |
parent | 7de2c661940c2df1d6f559c7f507ee99c86fbbf6 (diff) | |
download | scummvm-rg350-368a9917f7c05a2fbb780df7634b00e57aa51ab3.tar.gz scummvm-rg350-368a9917f7c05a2fbb780df7634b00e57aa51ab3.tar.bz2 scummvm-rg350-368a9917f7c05a2fbb780df7634b00e57aa51ab3.zip |
Add debug command line fix and config option, patch #655822
svn-id: r6034
-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(); |