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:
Mat M
2016-05-22 15:19:16 -04:00
36 changed files with 992 additions and 415 deletions

View File

@ -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);
}