GUI: Fixed some wxPostEvent endless loops
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4060 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
cc323e4849
commit
c1f091e4bc
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Version="9,00"
|
||||
Name="Common"
|
||||
ProjectGUID="{C573CAF7-EE6A-458E-8049-16C0BF34C2E9}"
|
||||
RootNamespace="Common"
|
||||
|
|
|
@ -101,6 +101,9 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxPanel)
|
|||
// Menu bar
|
||||
EVT_MENU(IDM_INTERPRETER, CCodeWindow::OnCPUMode) // CPU Mode
|
||||
EVT_MENU(IDM_AUTOMATICSTART, CCodeWindow::OnCPUMode)
|
||||
EVT_MENU(IDM_BOOTTOPAUSE, CCodeWindow::OnCPUMode)
|
||||
|
||||
EVT_MENU(IDM_JITUNLIMITED, CCodeWindow::OnCPUMode)
|
||||
EVT_MENU(IDM_JITOFF, CCodeWindow::OnCPUMode)
|
||||
EVT_MENU(IDM_JITLSOFF, CCodeWindow::OnCPUMode)
|
||||
EVT_MENU(IDM_JITLSLXZOFF, CCodeWindow::OnCPUMode)
|
||||
|
@ -711,7 +714,6 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
|
|||
case IDM_DEBUG_GO:
|
||||
{
|
||||
// [F|RES] prolly we should disable the other buttons in go mode too ...
|
||||
|
||||
if (CCPU::IsStepping())
|
||||
{
|
||||
CCPU::EnableStepping(false);
|
||||
|
|
|
@ -81,17 +81,6 @@ class CCodeWindow
|
|||
|
||||
enum
|
||||
{
|
||||
// Toolbar
|
||||
ID_TOOLBAR = 2000,
|
||||
IDM_DEBUG_GO,
|
||||
IDM_STEP,
|
||||
IDM_STEPOVER,
|
||||
IDM_SKIP,
|
||||
IDM_SETPC,
|
||||
IDM_GOTOPC,
|
||||
IDM_ADDRBOX,
|
||||
|
||||
// ==============================================================
|
||||
// Debugger GUI Objects
|
||||
ID_CODEVIEW,
|
||||
ID_CALLSTACKLIST,
|
||||
|
|
|
@ -549,8 +549,14 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
|||
// Post events
|
||||
void CFrame::PostEvent(wxCommandEvent& event)
|
||||
{
|
||||
// Don't post zero events, that may hang
|
||||
if (g_pCodeWindow && event.GetId()) wxPostEvent(g_pCodeWindow, event);
|
||||
// Restrict the post events to the minimum necessary, it seems like these events are
|
||||
// somtimes posted to the parent wxFrame too so that it creates and endless loop
|
||||
if (g_pCodeWindow
|
||||
&& event.GetId() >= IDM_INTERPRETER && event.GetId() <= IDM_ADDRBOX
|
||||
&& event.GetId() != IDM_JITUNLIMITED
|
||||
)
|
||||
wxPostEvent(g_pCodeWindow, event);
|
||||
event.Skip();
|
||||
}
|
||||
void CFrame::PostMenuEvent(wxMenuEvent& event)
|
||||
{
|
||||
|
|
|
@ -153,7 +153,7 @@ enum
|
|||
// --------------------------------------------------------------
|
||||
// Debugger Toolbar
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
ID_TOOLBAR2 = 2000,
|
||||
ID_TOOLBAR2,
|
||||
IDM_DEBUG_GO,
|
||||
IDM_STEP,
|
||||
IDM_STEPOVER,
|
||||
|
|
Loading…
Reference in New Issue