aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2011-06-03 13:35:53 +0200
committerMax Horn2011-06-03 13:36:04 +0200
commit8b3c36cfad99bc40742552b954df4751c3dbd149 (patch)
treeb41df208eb0cd3aed63a70110284f31550db7d42 /gui
parent279a5b4f32ebd9ed9df4390995e4bfc4da38f1df (diff)
downloadscummvm-rg350-8b3c36cfad99bc40742552b954df4751c3dbd149.tar.gz
scummvm-rg350-8b3c36cfad99bc40742552b954df4751c3dbd149.tar.bz2
scummvm-rg350-8b3c36cfad99bc40742552b954df4751c3dbd149.zip
GUI: Add 'openlog' command to debugger
Diffstat (limited to 'gui')
-rw-r--r--gui/debugger.cpp10
-rw-r--r--gui/debugger.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 2f49cb2bbe..3973583d38 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -59,6 +59,7 @@ Debugger::Debugger() {
DCmd_Register("quit", WRAP_METHOD(Debugger, Cmd_Exit));
DCmd_Register("help", WRAP_METHOD(Debugger, Cmd_Help));
+ DCmd_Register("openlog", WRAP_METHOD(Debugger, Cmd_OpenLog));
DCmd_Register("debugflag_list", WRAP_METHOD(Debugger, Cmd_DebugFlagsList));
DCmd_Register("debugflag_enable", WRAP_METHOD(Debugger, Cmd_DebugFlagEnable));
@@ -475,6 +476,15 @@ bool Debugger::Cmd_Help(int argc, const char **argv) {
return true;
}
+bool Debugger::Cmd_OpenLog(int argc, const char **argv) {
+ if (g_system->hasFeature(OSystem::kFeatureDisplayLogFile))
+ g_system->displayLogFile();
+ else
+ DebugPrintf("Opening the log file not supported on this system\n");
+ return true;
+}
+
+
bool Debugger::Cmd_DebugFlagsList(int argc, const char **argv) {
const Common::DebugManager::DebugChannelList &debugLevels = DebugMan.listDebugChannels();
diff --git a/gui/debugger.h b/gui/debugger.h
index 6da569e0f8..031e297bef 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -190,6 +190,7 @@ private:
protected:
bool Cmd_Exit(int argc, const char **argv);
bool Cmd_Help(int argc, const char **argv);
+ bool Cmd_OpenLog(int argc, const char **argv);
bool Cmd_DebugFlagsList(int argc, const char **argv);
bool Cmd_DebugFlagEnable(int argc, const char **argv);
bool Cmd_DebugFlagDisable(int argc, const char **argv);