Fix Emulation::CallAfter

Most CallAfter usages were extremely wrong when ordered after Emu.Stop(). could result in anywhere from emulation stopping hangs to even segfaults.
track_emu_state = true is now the default, I haven't found cases which need need it disabled.
This commit is contained in:
Eladash 2021-02-13 18:05:31 +02:00 committed by Ivan
parent 68a878264c
commit 112b7f6571
5 changed files with 40 additions and 23 deletions

View file

@ -35,11 +35,12 @@ s32 save_data_dialog::ShowSaveDataList(std::vector<SaveDataEntry>& save_entries,
sdid.exec();
selection = sdid.GetSelection();
dlg_result = true;
dlg_result.notify_one();
});
while (!dlg_result)
while (!dlg_result && !Emu.IsStopped())
{
thread_ctrl::wait_for(1000);
thread_ctrl::wait_on(dlg_result, false);
}
input::SetIntercepted(false);