mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Merge pull request #3794 from EmptyChaos/frame-advance-race
Core: Add synchronization to state changes (Fix Frame Step and FIFO Player - Issue 8718)
This commit is contained in:
@ -102,6 +102,7 @@ bool DolphinApp::OnInit()
|
||||
|
||||
Bind(wxEVT_QUERY_END_SESSION, &DolphinApp::OnEndSession, this);
|
||||
Bind(wxEVT_END_SESSION, &DolphinApp::OnEndSession, this);
|
||||
Bind(wxEVT_IDLE, &DolphinApp::OnIdle, this);
|
||||
|
||||
// Register message box and translation handlers
|
||||
RegisterMsgAlertHandler(&wxMsgAlert);
|
||||
@ -360,6 +361,12 @@ void DolphinApp::OnFatalException()
|
||||
WiimoteReal::Shutdown();
|
||||
}
|
||||
|
||||
void DolphinApp::OnIdle(wxIdleEvent& ev)
|
||||
{
|
||||
ev.Skip();
|
||||
Core::HostDispatchJobs();
|
||||
}
|
||||
|
||||
// ------------
|
||||
// Talk to GUI
|
||||
|
||||
@ -407,6 +414,12 @@ CFrame* DolphinApp::GetCFrame()
|
||||
|
||||
void Host_Message(int Id)
|
||||
{
|
||||
if (Id == WM_USER_JOB_DISPATCH)
|
||||
{
|
||||
// Trigger a wxEVT_IDLE
|
||||
wxWakeUpIdle();
|
||||
return;
|
||||
}
|
||||
wxCommandEvent event(wxEVT_HOST_COMMAND, Id);
|
||||
main_frame->GetEventHandler()->AddPendingEvent(event);
|
||||
}
|
||||
|
Reference in New Issue
Block a user