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:
John Peterson
2009-08-25 09:13:17 +00:00
parent cc323e4849
commit c1f091e4bc
5 changed files with 15 additions and 18 deletions

View File

@ -548,9 +548,15 @@ 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)
{

View File

@ -153,7 +153,7 @@ enum
// --------------------------------------------------------------
// Debugger Toolbar
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ID_TOOLBAR2 = 2000,
ID_TOOLBAR2,
IDM_DEBUG_GO,
IDM_STEP,
IDM_STEPOVER,