diff --git a/Source/Core/Core/Host.h b/Source/Core/Core/Host.h index 23796cc807..02448754bf 100644 --- a/Source/Core/Core/Host.h +++ b/Source/Core/Core/Host.h @@ -36,7 +36,6 @@ void Host_SetStartupDebuggingParameters(); void Host_SetWiiMoteConnectionState(int _State); void Host_ShowJitResults(unsigned int address); void Host_SysMessage(const char *fmt, ...); -void Host_UpdateBreakPointView(); void Host_UpdateDisasmDialog(); void Host_UpdateLogDisplay(); void Host_UpdateMainFrame(); diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp index 80b5598dfc..182451beac 100644 --- a/Source/Core/DolphinWX/Debugger/CodeView.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp @@ -33,6 +33,7 @@ #include "Common/SymbolDB.h" #include "Core/Core.h" #include "Core/Host.h" +#include "DolphinWX/Globals.h" #include "DolphinWX/WxUtils.h" #include "DolphinWX/Debugger/CodeView.h" #include "DolphinWX/Debugger/DebuggerUIUtil.h" @@ -139,7 +140,10 @@ void CCodeView::ToggleBreakpoint(u32 address) { m_debugger->ToggleBreakpoint(address); Refresh(); - Host_UpdateBreakPointView(); + + // Propagate back to the parent window to update the breakpoint list. + wxCommandEvent evt(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS); + GetEventHandler()->AddPendingEvent(evt); } void CCodeView::OnMouseMove(wxMouseEvent& event) diff --git a/Source/Core/DolphinWX/Debugger/MemoryView.cpp b/Source/Core/DolphinWX/Debugger/MemoryView.cpp index 0b4364a75e..c291b9c5ef 100644 --- a/Source/Core/DolphinWX/Debugger/MemoryView.cpp +++ b/Source/Core/DolphinWX/Debugger/MemoryView.cpp @@ -25,7 +25,7 @@ #include "Common/Common.h" #include "Common/DebugInterface.h" -#include "Core/Host.h" +#include "DolphinWX/Globals.h" #include "DolphinWX/WxUtils.h" #include "DolphinWX/Debugger/DebuggerUIUtil.h" #include "DolphinWX/Debugger/MemoryView.h" @@ -97,7 +97,10 @@ void CMemoryView::OnMouseDownL(wxMouseEvent& event) debugger->ToggleMemCheck(YToAddress(y)); Refresh(); - Host_UpdateBreakPointView(); + + // Propagate back to the parent window to update the breakpoint list. + wxCommandEvent evt(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS); + GetEventHandler()->AddPendingEvent(evt); } event.Skip(); diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index fb8ea71603..5a2fda3687 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -591,17 +591,6 @@ void Host_UpdateTitle(const std::string& title) main_frame->GetEventHandler()->AddPendingEvent(event); } -void Host_UpdateBreakPointView() -{ - wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS); - main_frame->GetEventHandler()->AddPendingEvent(event); - - if (main_frame->g_pCodeWindow) - { - main_frame->g_pCodeWindow->GetEventHandler()->AddPendingEvent(event); - } -} - void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height) { main_frame->GetRenderWindowSize(x, y, width, height); diff --git a/Source/Core/DolphinWX/MainAndroid.cpp b/Source/Core/DolphinWX/MainAndroid.cpp index b8f05b4684..11e9c34aaa 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -80,8 +80,6 @@ void Host_UpdateMainFrame() { } -void Host_UpdateBreakPointView(){} - void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height) { x = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos; diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index 6deebab93b..5710fc312f 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -76,8 +76,6 @@ void Host_UpdateMainFrame() updateMainFrameEvent.Set(); } -void Host_UpdateBreakPointView(){} - void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height) { x = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos; diff --git a/Source/UnitTests/TestUtils/StubHost.cpp b/Source/UnitTests/TestUtils/StubHost.cpp index 7dc5871c8e..c1c1adcae9 100644 --- a/Source/UnitTests/TestUtils/StubHost.cpp +++ b/Source/UnitTests/TestUtils/StubHost.cpp @@ -20,7 +20,6 @@ void Host_UpdateTitle(const std::string&) {} void Host_UpdateLogDisplay() {} void Host_UpdateDisasmDialog() {} void Host_UpdateMainFrame() {} -void Host_UpdateBreakPointView() {} void Host_GetRenderWindowSize(int&, int&, int&, int&) {} void Host_RequestRenderWindowSize(int, int) {} void Host_SetStartupDebuggingParameters() {}