Core: Kill off Host_UpdateBreakPointView()

Uses wxWidgets event propagation to the parent window which then appropriately handles the breakpoint list updating.
This commit is contained in:
Lioncash 2014-08-04 23:46:37 -04:00
parent 99dc069b9a
commit d4eb0684f7
7 changed files with 10 additions and 20 deletions

View File

@ -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();

View File

@ -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)

View File

@ -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();

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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() {}