diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-08-04 23:46:37 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-08-08 19:21:29 -0400 |
| commit | d4eb0684f76b012dbec22285100808608fd2b914 (patch) | |
| tree | 54d7f550e09cefb10a347e4b3039aee696ae7520 /Source/Core | |
| parent | 99dc069b9a19661cf529028f3d6d1aa5ee69cf29 (diff) | |
Core: Kill off Host_UpdateBreakPointView()
Uses wxWidgets event propagation to the parent window which then appropriately handles the breakpoint list updating.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Host.h | 1 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/CodeView.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/MemoryView.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Main.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/MainAndroid.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/MainNoGUI.cpp | 2 |
6 files changed, 10 insertions, 19 deletions
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; |
