Add some FXO init checks

This commit is contained in:
Elad 2024-12-24 18:28:28 +02:00
parent 98a0c76a08
commit c6dadc537b
2 changed files with 18 additions and 4 deletions

View File

@ -2718,8 +2718,15 @@ bool Emulator::Pause(bool freeze_emulation, bool show_resume_message)
cpu.state += cpu_flag::dbg_global_pause; cpu.state += cpu_flag::dbg_global_pause;
}; };
idm::select<named_thread<ppu_thread>>(on_select); if (g_fxo->is_init<id_manager::id_map<named_thread<ppu_thread>>>())
idm::select<named_thread<spu_thread>>(on_select); {
idm::select<named_thread<ppu_thread>>(on_select);
}
if (g_fxo->is_init<id_manager::id_map<named_thread<spu_thread>>>())
{
idm::select<named_thread<spu_thread>>(on_select);
}
if (auto rsx = g_fxo->try_get<rsx::thread>()) if (auto rsx = g_fxo->try_get<rsx::thread>())
{ {

View File

@ -1049,8 +1049,15 @@ void debugger_frame::UpdateUnitList()
if (emu_state != system_state::stopped) if (emu_state != system_state::stopped)
{ {
idm::select<named_thread<ppu_thread>>(on_select, idm::unlocked); if (g_fxo->is_init<id_manager::id_map<named_thread<ppu_thread>>>())
idm::select<named_thread<spu_thread>>(on_select, idm::unlocked); {
idm::select<named_thread<ppu_thread>>(on_select, idm::unlocked);
}
if (g_fxo->is_init<id_manager::id_map<named_thread<spu_thread>>>())
{
idm::select<named_thread<spu_thread>>(on_select, idm::unlocked);
}
if (const auto render = g_fxo->try_get<rsx::thread>(); render && render->ctrl) if (const auto render = g_fxo->try_get<rsx::thread>(); render && render->ctrl)
{ {