Fix RSX replay thread lifecycle

This commit is contained in:
kd-11 2020-11-29 21:06:57 +03:00 committed by kd-11
parent 924774d3ef
commit 845a7d9968
2 changed files with 5 additions and 1 deletions

View File

@ -238,5 +238,7 @@ namespace rsx
// random pause to not destroy gpu
std::this_thread::sleep_for(10ms);
}
get_current_cpu_thread()->state += (cpu_flag::exit + cpu_flag::wait);
}
}

View File

@ -553,7 +553,9 @@ bool Emulator::BootRsxCapture(const std::string& path)
GetCallbacks().on_run(false);
m_state = system_state::running;
g_fxo->init<named_thread<rsx::rsx_replay_thread>>("RSX Replay"sv, std::move(frame));
auto replay_thr = g_fxo->init<named_thread<rsx::rsx_replay_thread>>("RSX Replay"sv, std::move(frame));
replay_thr->state -= cpu_flag::stop;
thread_ctrl::notify(*replay_thr);
return true;
}