From 8b3c36cfad99bc40742552b954df4751c3dbd149 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 3 Jun 2011 13:35:53 +0200 Subject: GUI: Add 'openlog' command to debugger --- gui/debugger.cpp | 10 ++++++++++ gui/debugger.h | 1 + 2 files changed, 11 insertions(+) (limited to 'gui') 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); -- cgit v1.2.3