mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
RSX: Fix rsx capture stop
RSX captures froze on stop, at least with Vulkan.
This commit is contained in:
parent
6bd8a93ff4
commit
4be9e0d396
1 changed files with 24 additions and 0 deletions
|
@ -1755,6 +1755,30 @@ void Emulator::Kill(bool allow_autoexit)
|
||||||
});
|
});
|
||||||
|
|
||||||
// Signal threads
|
// Signal threads
|
||||||
|
|
||||||
|
// Stop the replay thread "game" first
|
||||||
|
if (auto thr = g_fxo->try_get<named_thread<rsx::rsx_replay_thread>>())
|
||||||
|
{
|
||||||
|
sys_log.notice("Stopping RSX replay thread...");
|
||||||
|
thr->state += cpu_flag::stop;
|
||||||
|
|
||||||
|
// Wait for a couple of seconds
|
||||||
|
for (int i = 0; *thr <= thread_state::aborting && i < 300; i++)
|
||||||
|
{
|
||||||
|
std::this_thread::sleep_for(10ms);
|
||||||
|
process_qt_events();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*thr <= thread_state::aborting)
|
||||||
|
{
|
||||||
|
sys_log.error("Failed to stop RSX replay thread in time.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sys_log.notice("RSX replay thread stopped");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (auto rsx = g_fxo->try_get<rsx::thread>())
|
if (auto rsx = g_fxo->try_get<rsx::thread>())
|
||||||
{
|
{
|
||||||
*static_cast<cpu_thread*>(rsx) = thread_state::aborting;
|
*static_cast<cpu_thread*>(rsx) = thread_state::aborting;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue