Fix support for custom game configs for homebrews

Fixes #21429
This commit is contained in:
Henrik Rydgård committed 2026-03-14 14:03:33 +01:00
1 parent 44140e5175
commit 445dd0bc0c
3 files changed
+9 -5

No files matched your search

+5 -3
View File
@@ -376,7 +376,9 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin
// Here we have read the PARAM.SFO, let's see if we need any compatibility overrides.
// Homebrew get fake disc IDs assigned to the global paramSFO, so they shouldn't clash with real games.
g_CoreParameter.compat.Load(g_paramSFO.GetDiscID());
std::string discId = g_paramSFO.GetDiscID();
g_CoreParameter.compat.Load(discId);
ShowCompatWarnings(g_CoreParameter.compat);
// This must be before Memory::Init because plugins can override the memory size.
@@ -451,7 +453,7 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin
dir = ResolvePBPDirectory(Path(dir)).ToString();
pspFileSystem.SetStartingDirectory("ms0:/" + dir.substr(pos));
}
if (!Load_PSP_ELF_PBP(fileLoader, errorString)) {
if (!Load_PSP_ELF_PBP(fileLoader, discId, errorString)) {
return false;
}
break;
@@ -462,7 +464,7 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin
case IdentifiedFileType::PSP_ELF:
{
INFO_LOG(Log::Loader, "File is an ELF or loose PBP %s", fileLoader->GetPath().c_str());
if (!Load_PSP_ELF_PBP(fileLoader, errorString)) {
if (!Load_PSP_ELF_PBP(fileLoader, discId, errorString)) {
ERROR_LOG(Log::Loader, "Failed to load ELF or loose PBP: %s", errorString->c_str());
return false;
}