diff options
-rw-r--r-- | gui/debugger.cpp | 10 | ||||
-rw-r--r-- | gui/debugger.h | 1 |
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); |