Fix SPU ELF loader

This commit is contained in:
Eladash 2020-10-08 08:27:20 +03:00 committed by Ivan
parent 89f1248140
commit 73f96f48ee

View File

@ -1630,7 +1630,11 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
if ((m_force_boot || g_cfg.misc.autostart) && IsReady())
{
Run(true);
if (ppu_exec == elf_error::ok)
{
Run(true);
}
m_force_boot = false;
}
else if (IsPaused())
@ -1674,14 +1678,12 @@ void Emulator::Run(bool start_playtime)
ConfigureLogs();
auto on_select = [](u32, cpu_thread& cpu)
// Run main thread
idm::check<named_thread<ppu_thread>>(ppu_thread::id_base, [](cpu_thread& cpu)
{
cpu.state -= cpu_flag::stop;
cpu.notify();
};
idm::select<named_thread<ppu_thread>>(on_select);
idm::select<named_thread<spu_thread>>(on_select);
});
if (g_cfg.misc.prevent_display_sleep)
{