make wxpostevent into addpendingevent hoping to solve some thread issue on linux

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4600 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-11-22 07:37:00 +00:00
parent 19d7bb2c84
commit 354078def6
2 changed files with 15 additions and 15 deletions

View File

@ -524,18 +524,18 @@ void CFrame::PostEvent(wxCommandEvent& event)
) )
{ {
event.StopPropagation(); event.StopPropagation();
wxPostEvent(g_pCodeWindow, event); g_pCodeWindow->AddPendingEvent(event);
} }
else else
event.Skip(); event.Skip();
} }
void CFrame::PostMenuEvent(wxMenuEvent& event) void CFrame::PostMenuEvent(wxMenuEvent& event)
{ {
if (g_pCodeWindow) wxPostEvent(g_pCodeWindow, event); if (g_pCodeWindow) g_pCodeWindow->AddPendingEvent(event);
} }
void CFrame::PostUpdateUIEvent(wxUpdateUIEvent& event) void CFrame::PostUpdateUIEvent(wxUpdateUIEvent& event)
{ {
if (g_pCodeWindow) wxPostEvent(g_pCodeWindow, event); if (g_pCodeWindow) g_pCodeWindow->AddPendingEvent(event);
} }
void CFrame::OnResize(wxSizeEvent& event) void CFrame::OnResize(wxSizeEvent& event)

View File

@ -510,11 +510,11 @@ void Host_Message(int Id)
void Host_NotifyMapLoaded() void Host_NotifyMapLoaded()
{ {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_NOTIFYMAPLOADED); wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_NOTIFYMAPLOADED);
wxPostEvent(main_frame, event); main_frame->AddPendingEvent(event);
if (main_frame->g_pCodeWindow) if (main_frame->g_pCodeWindow)
{ {
wxPostEvent(main_frame->g_pCodeWindow, event); main_frame->g_pCodeWindow->AddPendingEvent(event);
} }
} }
@ -522,11 +522,11 @@ void Host_NotifyMapLoaded()
void Host_UpdateLogDisplay() void Host_UpdateLogDisplay()
{ {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATELOGDISPLAY); wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATELOGDISPLAY);
wxPostEvent(main_frame, event); main_frame->AddPendingEvent(event);
if (main_frame->g_pCodeWindow) if (main_frame->g_pCodeWindow)
{ {
wxPostEvent(main_frame->g_pCodeWindow, event); main_frame->g_pCodeWindow->AddPendingEvent(event);
} }
} }
@ -534,11 +534,11 @@ void Host_UpdateLogDisplay()
void Host_UpdateDisasmDialog() void Host_UpdateDisasmDialog()
{ {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEDISASMDIALOG); wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEDISASMDIALOG);
wxPostEvent(main_frame, event); main_frame->AddPendingEvent(event);
if (main_frame->g_pCodeWindow) if (main_frame->g_pCodeWindow)
{ {
wxPostEvent(main_frame->g_pCodeWindow, event); main_frame->g_pCodeWindow->AddPendingEvent(event);
} }
} }
@ -551,22 +551,22 @@ void Host_ShowJitResults(unsigned int address)
void Host_UpdateMainFrame() void Host_UpdateMainFrame()
{ {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEGUI); wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEGUI);
wxPostEvent(main_frame, event); main_frame->AddPendingEvent(event);
if (main_frame->g_pCodeWindow) if (main_frame->g_pCodeWindow)
{ {
wxPostEvent(main_frame->g_pCodeWindow, event); main_frame->g_pCodeWindow->AddPendingEvent(event);
} }
} }
void Host_UpdateBreakPointView() void Host_UpdateBreakPointView()
{ {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS); wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS);
wxPostEvent(main_frame, event); main_frame->AddPendingEvent(event);
if (main_frame->g_pCodeWindow) if (main_frame->g_pCodeWindow)
{ {
wxPostEvent(main_frame->g_pCodeWindow, event); main_frame->g_pCodeWindow->AddPendingEvent(event);
} }
} }
@ -643,7 +643,7 @@ void Host_UpdateStatusBar(const char* _pText, int Field)
// Post message // Post message
// TODO : this has been said to cause hang (??) how is that even possible ? :d // TODO : this has been said to cause hang (??) how is that even possible ? :d
event.StopPropagation(); event.StopPropagation();
wxPostEvent(main_frame, event); main_frame->AddPendingEvent(event);
// Process the event before continue // Process the event before continue
wxGetApp().ProcessPendingEvents(); wxGetApp().ProcessPendingEvents();
} }
@ -670,6 +670,6 @@ void Host_SetWiiMoteConnectionState(int _State)
event.SetInt(1); event.SetInt(1);
#endif #endif
wxPostEvent(main_frame, event); main_frame->AddPendingEvent(event);
} }
#endif // HAVE_WX #endif // HAVE_WX