DolphinWX: In Host_ConnectWiimote(), instead of calling CFrame::ConnectWiimote() directly, dispatch an event that will call it for us in the GUI thread.

This eliminates a possible stutter/short freeze that can happen during PowerPC::Pause().
This commit is contained in:
Admiral H. Curtiss
2015-07-16 02:00:56 +02:00
parent 5594b107eb
commit 935292c6fc
3 changed files with 38 additions and 1 deletions

View File

@ -540,7 +540,16 @@ bool Host_RendererIsFullscreen()
void Host_ConnectWiimote(int wm_idx, bool connect)
{
CFrame::ConnectWiimote(wm_idx, connect);
if (connect)
{
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_FORCE_CONNECT_WIIMOTE1 + wm_idx);
main_frame->GetEventHandler()->AddPendingEvent(event);
}
else
{
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_FORCE_DISCONNECT_WIIMOTE1 + wm_idx);
main_frame->GetEventHandler()->AddPendingEvent(event);
}
}
void Host_ShowVideoConfig(void* parent, const std::string& backend_name,