mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-06 03:25:36 +00:00
Cheats: Fix setting overrides applying for blacklisted patches
This commit is contained in:
parent
1547de2b3c
commit
871323f4e1
@ -946,14 +946,18 @@ void Cheats::UnloadAll()
|
||||
|
||||
bool Cheats::HasAnySettingOverrides()
|
||||
{
|
||||
const bool hc_mode_active = Achievements::IsHardcoreModeActive();
|
||||
for (const std::string& name : s_enabled_patches)
|
||||
{
|
||||
for (std::unique_ptr<CheatCode>& code : s_patch_codes)
|
||||
{
|
||||
if (name == code->GetName())
|
||||
{
|
||||
if (code->HasAnySettingOverrides())
|
||||
return true;
|
||||
if (!code->GetMetadata().disallow_for_achievements || !hc_mode_active)
|
||||
{
|
||||
if (code->HasAnySettingOverrides())
|
||||
return true;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@ -966,13 +970,16 @@ bool Cheats::HasAnySettingOverrides()
|
||||
void Cheats::ApplySettingOverrides()
|
||||
{
|
||||
// only need to check patches for this
|
||||
const bool hc_mode_active = Achievements::IsHardcoreModeActive();
|
||||
for (const std::string& name : s_enabled_patches)
|
||||
{
|
||||
for (std::unique_ptr<CheatCode>& code : s_patch_codes)
|
||||
{
|
||||
if (name == code->GetName())
|
||||
{
|
||||
code->ApplySettingOverrides();
|
||||
if (!code->GetMetadata().disallow_for_achievements || !hc_mode_active)
|
||||
code->ApplySettingOverrides();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user