From 4b4ffba0800eeb11e78772f5e10ea136063d54ba Mon Sep 17 00:00:00 2001 From: Eladash Date: Sun, 10 Sep 2023 09:55:34 +0300 Subject: [PATCH] Fix OVL file preview loading --- rpcs3/Emu/System.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index a3aad6220f..24a9dcca8c 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -2071,14 +2071,20 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, } } // Overlay (OVL) executable (only load it) - else if (vm::map(0x3000'0000, 0x1000'0000, 0x200); !ppu_load_overlay(ppu_exec, false, m_path).first) - { - ppu_exec.set_error(elf_error::header_type); - } else { - // Preserve emulation state for OVL executable - Pause(true); + GetCallbacks().on_ready(); + g_fxo->init(false); + + if (!vm::map(0x3000'0000, 0x1000'0000, 0x200) || !ppu_load_overlay(ppu_exec, false, m_path).first) + { + ppu_exec.set_error(elf_error::header_type); + } + else + { + // Preserve emulation state for OVL executable + Pause(true); + } } if (ppu_exec != elf_error::ok)