diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index ae9b3ef47a..0bcd73fda7 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -430,11 +430,11 @@ static void ppu_initialize_modules(ppu_linkage_info* link, utils::serial* ar = n if (ar) { - g_fxo->init(*ar); + ensure(g_fxo->init(*ar)); } else { - g_fxo->init(); + ensure(g_fxo->init()); } for (auto& pair : ppu_module_manager::get()) @@ -1090,7 +1090,7 @@ void init_ppu_functions(utils::serial* ar, bool full = false) if (ar) { - const u32 addr = g_fxo->init(*ar)->addr; + const u32 addr = ensure(g_fxo->init(*ar))->addr; if (addr % 0x1000 || !vm::check_addr(addr)) { @@ -1098,7 +1098,7 @@ void init_ppu_functions(utils::serial* ar, bool full = false) } } else - g_fxo->init(); + ensure(g_fxo->init()); if (full) { @@ -2279,7 +2279,7 @@ bool ppu_load_exec(const ppu_exec_object& elf, bool virtual_load, const std::str // Static HLE patching if (g_cfg.core.hook_functions && !virtual_load) { - auto shle = g_fxo->init(0); + auto shle = ensure(g_fxo->init(0)); for (u32 i = _main.segs[0].addr; i < (_main.segs[0].addr + _main.segs[0].size); i += 4) { @@ -2531,11 +2531,14 @@ bool ppu_load_exec(const ppu_exec_object& elf, bool virtual_load, const std::str // Make init_mem_containers empty before call const auto callback = std::move(Emu.init_mem_containers); callback(mem_size); + + ensure(g_fxo->is_init>()); + ensure(g_fxo->is_init()); } else if (!ar) { - g_fxo->init>(); - g_fxo->init(mem_size); + ensure(g_fxo->init>()); + ensure(g_fxo->init(mem_size)); } void init_fxo_for_exec(utils::serial* ar, bool full); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 191ee7908a..2012aeb45b 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1646,7 +1646,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, { m_state = system_state::ready; GetCallbacks().on_ready(); - g_fxo->init(); + ensure(g_fxo->init()); vm::init(); m_force_boot = false; @@ -2345,7 +2345,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, sys_log.error("Booting HG category outside of HDD0!"); } - const auto _main = g_fxo->init(); + const auto _main = ensure(g_fxo->init()); if (ppu_load_exec(ppu_exec, false, m_path, DeserialManager())) { diff --git a/rpcs3/main_application.cpp b/rpcs3/main_application.cpp index cf8373e95a..0040bb235e 100644 --- a/rpcs3/main_application.cpp +++ b/rpcs3/main_application.cpp @@ -125,7 +125,7 @@ EmuCallbacks main_application::CreateCallbacks() { case keyboard_handler::null: { - g_fxo->init(Emu.DeserialManager()); + ensure(g_fxo->init(Emu.DeserialManager())); break; } case keyboard_handler::basic: @@ -162,7 +162,7 @@ EmuCallbacks main_application::CreateCallbacks() { case mouse_handler::null: { - g_fxo->init(Emu.DeserialManager()); + ensure(g_fxo->init(Emu.DeserialManager())); break; } case mouse_handler::basic: @@ -175,7 +175,7 @@ EmuCallbacks main_application::CreateCallbacks() } case mouse_handler::raw: { - g_fxo->init(Emu.DeserialManager()); + ensure(g_fxo->init(Emu.DeserialManager())); break; } }