[Scummvm-cvs-logs] scummvm master -> 10c5547de3fa6c5125a9f969a18e80bf05d4cc2a
lordhoto
lordhoto at gmail.com
Thu Jun 5 16:41:30 CEST 2014
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
559c10e91a COMMON: Don't allow debug channel 'all' to be used.
960e16009c BASE: Allow 'all' to enable all debug channels via CLI too.
10c5547de3 GUI: Allow any cased version of 'all' to toggle all debug flags.
Commit: 559c10e91af05b846355156a439ce873d8e241e3
https://github.com/scummvm/scummvm/commit/559c10e91af05b846355156a439ce873d8e241e3
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-06-05T16:32:27+02:00
Commit Message:
COMMON: Don't allow debug channel 'all' to be used.
Changed paths:
common/debug.cpp
diff --git a/common/debug.cpp b/common/debug.cpp
index b8c345e..182b28a 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -46,6 +46,11 @@ struct DebugLevelComperator {
} // end of anonymous namespace
bool DebugManager::addDebugChannel(uint32 channel, const String &name, const String &description) {
+ if (name.equalsIgnoreCase("all")) {
+ warning("Debug channel 'all' is reserved for internal use");
+ return false;
+ }
+
if (gDebugChannels.contains(name))
warning("Duplicate declaration of engine debug channel '%s'", name.c_str());
Commit: 960e16009c634e4060ffd892b19834b49ddfcbe9
https://github.com/scummvm/scummvm/commit/960e16009c634e4060ffd892b19834b49ddfcbe9
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-06-05T16:35:07+02:00
Commit Message:
BASE: Allow 'all' to enable all debug channels via CLI too.
Changed paths:
base/main.cpp
diff --git a/base/main.cpp b/base/main.cpp
index 1fa75d5..7451c00 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -222,7 +222,9 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
Common::StringTokenizer tokenizer(edebuglevels, " ,");
while (!tokenizer.empty()) {
Common::String token = tokenizer.nextToken();
- if (!DebugMan.enableDebugChannel(token))
+ if (token.equalsIgnoreCase("all"))
+ DebugMan.enableAllDebugChannels();
+ else if (!DebugMan.enableDebugChannel(token))
warning(_("Engine does not support debug level '%s'"), token.c_str());
}
Commit: 10c5547de3fa6c5125a9f969a18e80bf05d4cc2a
https://github.com/scummvm/scummvm/commit/10c5547de3fa6c5125a9f969a18e80bf05d4cc2a
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-06-05T16:40:42+02:00
Commit Message:
GUI: Allow any cased version of 'all' to toggle all debug flags.
This makes it consistent with our matching rules when enabling other debug
flags.
Changed paths:
gui/debugger.cpp
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 21d4977..dcdc18d 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -544,7 +544,7 @@ bool Debugger::cmdDebugFlagEnable(int argc, const char **argv) {
if (argc < 2) {
debugPrintf("debugflag_enable [<flag> | all]\n");
} else {
- if (Common::String(argv[1]) == "all") {
+ if (!scumm_stricmp(argv[1], "all")) {
debugPrintf("Enabled all debug flags\n");
DebugMan.enableAllDebugChannels();
} else if (DebugMan.enableDebugChannel(argv[1])) {
@@ -560,7 +560,7 @@ bool Debugger::cmdDebugFlagDisable(int argc, const char **argv) {
if (argc < 2) {
debugPrintf("debugflag_disable [<flag> | all]\n");
} else {
- if (Common::String(argv[1]) == "all") {
+ if (!scumm_stricmp(argv[1], "all")) {
debugPrintf("Disabled all debug flags\n");
DebugMan.disableAllDebugChannels();
} else if (DebugMan.disableDebugChannel(argv[1])) {
More information about the Scummvm-git-logs
mailing list