mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
Changed the semantics of debug level 0 from off back to something more similiar to how it used to be (default debug level now is -1)
svn-id: r17788
This commit is contained in:
parent
5553ef53f1
commit
ce3cd9b194
@ -47,8 +47,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern int gDebugLevel;
|
||||
|
||||
// DONT FIXME: DO NOT ORDER ALPHABETICALLY, THIS IS ORDERED BY IMPORTANCE/CATEGORY! :)
|
||||
#ifdef __PALM_OS__
|
||||
static const char USAGE_STRING[] = "NoUsageString"; // save more data segment space
|
||||
@ -378,7 +376,7 @@ void GameDetector::parseCommandLine(int argc, char **argv) {
|
||||
END_OPTION
|
||||
|
||||
DO_OPTION_OPT('d', "debuglevel")
|
||||
gDebugLevel = option ? (int)strtol(option, 0, 10) : 1;
|
||||
gDebugLevel = option ? (int)strtol(option, 0, 10) : 0;
|
||||
printf("Debuglevel (from command line): %d\n", gDebugLevel);
|
||||
END_OPTION
|
||||
|
||||
|
@ -185,8 +185,13 @@ static void do_memory_test(void) {
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
int gDebugLevel = 0;
|
||||
/**
|
||||
* The debug level. Initially set to -1, indicating that no debug output
|
||||
* should be shown. Positive values usually imply an increasing number of
|
||||
* debug output shall be generated, the higher the value, the more verbose the
|
||||
* information (although the exact semantics are up to the engines).
|
||||
*/
|
||||
int gDebugLevel = -1;
|
||||
|
||||
static void setupDummyPalette(OSystem &system) {
|
||||
// FIXME - mouse cursors are currently always set via 8 bit data.
|
||||
|
@ -596,10 +596,10 @@ bool ScummDebugger::Cmd_DebugLevel(int argc, const char **argv) {
|
||||
DebugPrintf("Debugging is currently set at level %d\n", gDebugLevel);
|
||||
} else { // set level
|
||||
gDebugLevel = atoi(argv[1]);
|
||||
if (gDebugLevel > 0) {
|
||||
if (gDebugLevel >= 0) {
|
||||
_vm->_debugMode = true;
|
||||
DebugPrintf("Debug level set to level %d\n", gDebugLevel);
|
||||
} else if (gDebugLevel == 0) {
|
||||
} else if (gDebugLevel < 0) {
|
||||
_vm->_debugMode = false;
|
||||
DebugPrintf("Debugging is now disabled\n");
|
||||
} else
|
||||
|
@ -1058,7 +1058,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
g_scumm = this;
|
||||
|
||||
// Read settings from the detector & config manager
|
||||
_debugMode = (gDebugLevel > 0);
|
||||
_debugMode = (gDebugLevel >= 0);
|
||||
_dumpScripts = detector->_dumpScripts;
|
||||
_bootParam = ConfMan.getInt("boot_param");
|
||||
|
||||
|
@ -90,10 +90,10 @@ bool Debugger::Cmd_DebugLevel(int argc, const char **argv) {
|
||||
DebugPrintf("Debugging is currently set at level %d\n", gDebugLevel);
|
||||
} else { // set level
|
||||
gDebugLevel = atoi(argv[1]);
|
||||
if (gDebugLevel > 0 && gDebugLevel < 10) {
|
||||
if (gDebugLevel >= 0 && gDebugLevel < 10) {
|
||||
_vm->_debugMode = true;
|
||||
DebugPrintf("Debug level set to level %d\n", gDebugLevel);
|
||||
} else if (gDebugLevel == 0) {
|
||||
} else if (gDebugLevel < 0) {
|
||||
_vm->_debugMode = false;
|
||||
DebugPrintf("Debugging is now disabled\n");
|
||||
} else
|
||||
|
@ -695,7 +695,7 @@ int SimonEngine::init(GameDetector &detector) {
|
||||
warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret));
|
||||
midi.set_volume(ConfMan.getInt("music_volume"));
|
||||
|
||||
_debugMode = (gDebugLevel > 0);
|
||||
_debugMode = (gDebugLevel >= 0);
|
||||
|
||||
if (ConfMan.hasKey("music_mute") && ConfMan.getBool("music_mute") == 1)
|
||||
midi.pause(_music_paused ^= 1);
|
||||
|
Loading…
Reference in New Issue
Block a user