From bf8a1684d15268c267db5d7becd41a3e5b0fbd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 29 Jan 2024 18:59:15 +0100 Subject: [PATCH] Fix per-game configs, thanks Verymelon --- UI/GameInfoCache.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 15718d4ec9..d2ffc7374c 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -476,7 +476,6 @@ public: if (flags_ & GameInfoFlags::FILE_TYPE) { info_->fileType = Identify_File(info_->GetFileLoader().get(), &errorString); - info_->hasConfig = g_Config.hasGameConfig(info_->id); } switch (info_->fileType) { @@ -765,6 +764,11 @@ handleELF: break; } + if (flags_ & GameInfoFlags::PARAM_SFO) { + // We fetch the hasConfig together with the params, since that's what fills out the id. + info_->hasConfig = g_Config.hasGameConfig(info_->id); + } + if (flags_ & GameInfoFlags::SIZE) { std::lock_guard lock(info_->lock); info_->gameSizeOnDisk = info_->GetGameSizeOnDiskInBytes();