mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
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:
@ -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,
|
||||
|
Reference in New Issue
Block a user