From f445483f9cb71a82c7a32955b05b9cae6df82e6a Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 18 Jan 2018 23:25:36 +1100 Subject: [PATCH] [Debugger] Show commands on stepping --- Source/Project64/UserInterface/Debugger/Debugger.cpp | 10 ++++++++++ Source/Project64/UserInterface/Debugger/debugger.h | 1 + 2 files changed, 11 insertions(+) diff --git a/Source/Project64/UserInterface/Debugger/Debugger.cpp b/Source/Project64/UserInterface/Debugger/Debugger.cpp index 32d32b4e1..c9ab9710c 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger.cpp @@ -42,10 +42,12 @@ CDebuggerUI::CDebuggerUI() : CSymbols::InitializeCriticalSection(); g_Settings->RegisterChangeCB(GameRunning_InReset, this, (CSettings::SettingChangedFunc)GameReset); + g_Settings->RegisterChangeCB(Debugger_SteppingOps, this, (CSettings::SettingChangedFunc)SteppingOpsChanged); } CDebuggerUI::~CDebuggerUI(void) { + g_Settings->UnregisterChangeCB(Debugger_SteppingOps, this, (CSettings::SettingChangedFunc)SteppingOpsChanged); g_Settings->UnregisterChangeCB(GameRunning_InReset, this, (CSettings::SettingChangedFunc)GameReset); Debug_Reset(); delete m_MemoryView; @@ -62,6 +64,14 @@ CDebuggerUI::~CDebuggerUI(void) CSymbols::DeleteCriticalSection(); } +void CDebuggerUI::SteppingOpsChanged(CDebuggerUI * _this) +{ + if (g_Settings->LoadBool(Debugger_SteppingOps)) + { + _this->OpenCommandWindow(); + } +} + void CDebuggerUI::GameReset(CDebuggerUI * _this) { if (!g_Settings->LoadBool(GameRunning_InReset)) diff --git a/Source/Project64/UserInterface/Debugger/debugger.h b/Source/Project64/UserInterface/Debugger/debugger.h index 730b7a901..b904d04c6 100644 --- a/Source/Project64/UserInterface/Debugger/debugger.h +++ b/Source/Project64/UserInterface/Debugger/debugger.h @@ -68,6 +68,7 @@ public: CDMALog* DMALog(); static void GameReset(CDebuggerUI * _this); + static void SteppingOpsChanged(CDebuggerUI * _this); protected: void TLBChanged(void);