1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Fix emulator crash when stopping emulation after being paused (#13530)

This commit is contained in:
Elad Ashkenazi 2023-04-05 22:53:01 +03:00 committed by GitHub
parent 8a509afc20
commit c6ab1aa227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2498,7 +2498,13 @@ void Emulator::GracefulShutdown(bool allow_autoexit, bool async_op, bool savesta
for (u32 i = 100; i < 140; i++)
{
std::this_thread::sleep_for(50ms);
Resume(); // TODO: Prevent pausing by other threads while in this loop
// TODO: Prevent pausing by other threads while in this loop
CallFromMainThread([this]()
{
Resume();
}, nullptr, true, read_counter);
process_qt_events(); // Is nullified when performed on non-main thread
if (!read_sysutil_signal && read_counter != get_sysutil_cb_manager_read_count())