1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

Fixup Create PPU Cache

This commit is contained in:
Eladash 2023-08-29 21:44:57 +03:00 committed by Elad Ashkenazi
parent ee9477dc21
commit 6d0390bad9

View File

@ -1467,7 +1467,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
if (obj == elf_error::ok && ppu_load_exec(obj, true, path))
{
g_fxo->get<main_ppu_module>().path = path;
ensure(g_fxo->try_get<main_ppu_module>())->path = path;
}
else
{
@ -1478,13 +1478,14 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
g_fxo->init<named_thread>("SPRX Loader"sv, [this, dir_queue]() mutable
{
if (auto& _main = g_fxo->get<main_ppu_module>(); !_main.path.empty())
if (auto& _main = *ensure(g_fxo->try_get<main_ppu_module>()); !_main.path.empty())
{
if (!_main.analyse(0, _main.elf_entry, _main.seg0_code_end, _main.applied_pathes, [](){ return Emu.IsStopped(); }))
{
return;
}
Emu.ConfigurePPUCache();
ppu_initialize(_main);
}