diff options
| author | LillyJadeKatrin <lilly.kitty.1988@gmail.com> | 2025-08-08 17:09:53 -0400 |
|---|---|---|
| committer | LillyJadeKatrin <lilly.kitty.1988@gmail.com> | 2025-08-10 07:47:19 -0400 |
| commit | 39ea49fc3941f2adc8e648f367aaf9fc29b12e5d (patch) | |
| tree | 4c3928c5e7bf547415de29e0ae7047c597a75e13 /Source/Core | |
| parent | e6ed939952f108aeaedc2763b391f2471203305e (diff) | |
Fixed Patch Allowlist Check
Previous changes to the patch allowlist format were not reflected in AchievementManager; this corrects that and re-enables patches and codes in hardcore mode.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/AchievementManager.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp index be971055ff..aa8f0b1321 100644 --- a/Source/Core/Core/AchievementManager.cpp +++ b/Source/Core/Core/AchievementManager.cpp @@ -485,8 +485,16 @@ bool AchievementManager::CheckApprovedCode(const T& code, const std::string& gam for (const std::string& filename : ConfigLoaders::GetGameIniFilenames(game_id, revision)) { auto config = filename.substr(0, filename.length() - 4); - if (m_ini_root->contains(config) && m_ini_root->get(config).contains(hash)) - verified = true; + if (m_ini_root->contains(config)) + { + auto ini_config = m_ini_root->get(config); + if (ini_config.is<picojson::object>() && ini_config.contains(code.name)) + { + auto ini_code = ini_config.get(code.name); + if (ini_code.template is<std::string>()) + verified = (ini_code.template get<std::string>() == hash); + } + } } if (!verified) |
