From 54a7095522e44ddeb9b68064e2b51cf302c6b3bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 4 Nov 2025 13:52:01 +0100 Subject: [PATCH] Fix an issue where game-specific configs didn't affect the software renderer setting properly. Fixes #20923 --- Core/PSPLoaders.cpp | 1 - Core/System.cpp | 16 ++++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index aa1e9f6b74..83e2c35fee 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -261,7 +261,6 @@ bool Load_PSP_ISO(FileLoader *fileLoader, std::string *error_string) { return false; } - //in case we didn't go through EmuScreen::boot g_Config.loadGameConfig(id, g_paramSFO.GetValueString("TITLE")); System_PostUIMessage(UIMessage::CONFIG_LOADED); INFO_LOG(Log::Loader, "Loading %s...", bootpath.c_str()); diff --git a/Core/System.cpp b/Core/System.cpp index 35d8604b01..78f1fc0959 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -360,11 +360,6 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin g_CoreParameter.compat.Load(g_paramSFO.GetDiscID()); ShowCompatWarnings(g_CoreParameter.compat); - // Compat settings can override the software renderer, take care of that here. - if (g_Config.bSoftwareRendering || PSP_CoreParameter().compat.flags().ForceSoftwareRenderer) { - g_CoreParameter.gpuCore = GPUCORE_SOFTWARE; - } - // This must be before Memory::Init because plugins can override the memory size. if (type != IdentifiedFileType::PPSSPP_GE_DUMP) { HLEPlugins::Init(); @@ -421,7 +416,9 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin g_CoreParameter.mountIsoLoader = ConstructFileLoader(g_CoreParameter.mountIso); } - // TODO: Check Game INI here for settings, patches and cheats, and modify coreParameter accordingly + // Game-specific settings are load from for example Load_PSP_ISO (which calls g_Config.loadGameConfig). + // We can't do things that depend on these before the below switch. So for example, the adjustment of the GPU core + // to software has now been moved below it. // If they shut down early, we'll catch it when load completes. // Note: this may return before init is complete, which is checked if CPU_IsReady(). @@ -482,6 +479,13 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin g_recentFiles.Add(g_CoreParameter.fileToStart.ToString()); } + // Update things that depend on game-specific config here. + + // Compat settings can override the software renderer, take care of that here. + if (g_Config.bSoftwareRendering || g_CoreParameter.compat.flags().ForceSoftwareRenderer) { + g_CoreParameter.gpuCore = GPUCORE_SOFTWARE; + } + InstallExceptionHandler(&Memory::HandleFault); return true; }