Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup for preloading SPRX from MSELF #9679

Merged
merged 1 commit into from Jan 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions rpcs3/Emu/Cell/PPUThread.cpp
Expand Up @@ -2117,7 +2117,7 @@ extern void ppu_precompile(std::vector<std::string>& 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{};

Expand Down Expand Up @@ -2154,7 +2154,7 @@ extern void ppu_precompile(std::vector<std::string>& 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);

Expand All @@ -2165,6 +2165,9 @@ extern void ppu_precompile(std::vector<std::string>& dir_queue)
{
// Adjust offset for MSELF
src.reset(std::make_unique<file_view>(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
Expand Down