From bb2cc196a6c641983607e400b904da63083ffdc2 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 29 Jan 2021 21:06:49 +0300 Subject: [PATCH] Fixup for preloading SPRX from MSELF Forgot to append the offset. Forgot to use different loop variable. --- rpcs3/Emu/Cell/PPUThread.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 1666c5d70d..0f914b40db 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -2117,7 +2117,7 @@ extern void ppu_precompile(std::vector& dir_queue) if (mself.read(hdr) && hdr.get_count(mself.size())) { - for (u32 i = 0; i < hdr.count; i++) + for (u32 j = 0; j < hdr.count; j++) { mself_record rec{}; @@ -2154,7 +2154,7 @@ extern void ppu_precompile(std::vector& dir_queue) { for (usz func_i = fnext++; func_i < file_queue.size(); func_i = fnext++) { - const auto& path = std::as_const(file_queue)[func_i].first; + std::string path = std::as_const(file_queue)[func_i].first; ppu_log.notice("Trying to load SPRX: %s", path); @@ -2165,6 +2165,9 @@ extern void ppu_precompile(std::vector& dir_queue) { // Adjust offset for MSELF src.reset(std::make_unique(std::move(src), off)); + + // Adjust path for MSELF too + fmt::append(path, "_x%x", off); } // Some files may fail to decrypt due to the lack of klic