aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTravis Howell2003-09-06 04:07:20 +0000
committerTravis Howell2003-09-06 04:07:20 +0000
commitd1c325a8c72d3b92fdee4d606a40fd320a82dc7e (patch)
treefa91c943bc8aa8f915975c5f46be455351742b74 /common
parent3fe6b6ca7fcb2e6d98be3d2efe0b1c871c79284f (diff)
downloadscummvm-rg350-d1c325a8c72d3b92fdee4d606a40fd320a82dc7e.tar.gz
scummvm-rg350-d1c325a8c72d3b92fdee4d606a40fd320a82dc7e.tar.bz2
scummvm-rg350-d1c325a8c72d3b92fdee4d606a40fd320a82dc7e.zip
Fix debug level, only > 1 should be valid.
svn-id: r10039
Diffstat (limited to 'common')
-rw-r--r--common/gameDetector.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp
index 32d0434335..e1880c9bfc 100644
--- a/common/gameDetector.cpp
+++ b/common/gameDetector.cpp
@@ -333,7 +333,7 @@ void GameDetector::updateconfig() {
_sfx_volume = g_config->getInt("sfx_volume", _sfx_volume);
_debugLevel = g_config->getInt("debuglevel", _debugLevel);
- if (_debugLevel > 0)
+ if (_debugLevel)
_debugMode = true;
// We use strtol for the tempo to allow it to be specified in hex.
@@ -392,11 +392,13 @@ void GameDetector::parseCommandLine(int argc, char **argv) {
g_config->setInt("cdrom", _cdrom);
break;
case 'd':
- _debugMode = true;
HANDLE_OPT_OPTION();
if (option != NULL)
_debugLevel = atoi(option);
- debug(1,"Debuglevel (from command line): %d", _debugLevel);
+ if (_debugLevel) {
+ _debugMode = true;
+ printf("Debuglevel (from command line): %d\n", _debugLevel);
+ }
break;
case 'e':
HANDLE_OPTION();
@@ -595,7 +597,8 @@ void GameDetector::setGame(const String &name) {
g_config->delete_domain("_COMMAND_LINE");
g_config->delete_domain("_USER_OVERRIDES");
g_config->set_domain(name);
- debug(1, "Debuglevel (from config): %d", _debugLevel);
+ if (_debugMode)
+ printf("Debuglevel (from config): %d\n", _debugLevel);
}
int GameDetector::parseGraphicsMode(const char *s) {