mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Check for rsx::thread existence in Emu.Stop/Pause/Resume
This commit is contained in:
parent
51d19e7c31
commit
6784301376
1 changed files with 17 additions and 3 deletions
|
@ -1789,7 +1789,11 @@ bool Emulator::Pause()
|
|||
|
||||
idm::select<named_thread<ppu_thread>>(on_select);
|
||||
idm::select<named_thread<spu_thread>>(on_select);
|
||||
g_fxo->get<rsx::thread>()->state += cpu_flag::dbg_global_pause;
|
||||
|
||||
if (auto rsx = g_fxo->get<rsx::thread>())
|
||||
{
|
||||
rsx->state += cpu_flag::dbg_global_pause;
|
||||
}
|
||||
|
||||
// Always Enable display sleep, not only if it was prevented.
|
||||
enable_display_sleep();
|
||||
|
@ -1858,7 +1862,12 @@ void Emulator::Resume()
|
|||
|
||||
idm::select<named_thread<ppu_thread>>(on_select);
|
||||
idm::select<named_thread<spu_thread>>(on_select);
|
||||
g_fxo->get<rsx::thread>()->state -= cpu_flag::dbg_global_pause;
|
||||
|
||||
if (auto rsx = g_fxo->get<rsx::thread>())
|
||||
{
|
||||
// TODO: notify?
|
||||
rsx->state -= cpu_flag::dbg_global_pause;
|
||||
}
|
||||
|
||||
GetCallbacks().on_resume();
|
||||
|
||||
|
@ -1910,7 +1919,12 @@ void Emulator::Stop(bool restart)
|
|||
|
||||
GetCallbacks().on_stop();
|
||||
|
||||
g_fxo->get<rsx::thread>()->state += cpu_flag::exit;
|
||||
if (auto rsx = g_fxo->get<rsx::thread>())
|
||||
{
|
||||
// TODO: notify?
|
||||
rsx->state += cpu_flag::exit;
|
||||
}
|
||||
|
||||
cpu_thread::stop_all();
|
||||
g_fxo->reset();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue