Achievements: Reapply settings on HC enable

This commit is contained in:
Connor McLaughlin 2022-10-08 21:38:43 +10:00 committed by refractionpcsx2
parent 9615120586
commit 28e33e1883
2 changed files with 10 additions and 1 deletions

View File

@ -548,7 +548,7 @@ void Achievements::UpdateSettings(const Pcsx2Config::AchievementsOptions& old_co
}
else if (!s_challenge_mode && EmuConfig.Achievements.ChallengeMode)
{
Host::AddKeyedOSDMessage("challenge_mode_reset", "Hardcore mode will be enabled on system reset.", 10.0f);
ImGuiFullscreen::ShowToast(std::string(), "Hardcore mode will be enabled on system reset.", 10.0f);
}
}

View File

@ -1102,8 +1102,17 @@ void VMManager::Shutdown(bool save_resume_state)
void VMManager::Reset()
{
#ifdef ENABLE_ACHIEVEMENTS
const bool previous_challenge_mode = Achievements::ChallengeModeActive();
if (!Achievements::OnReset())
return;
if (Achievements::ChallengeModeActive() && !previous_challenge_mode)
{
// Hardcore mode enabled, so reload settings. This only covers the BIOS
// portion of the boot, once the game loads we'll reset anyway, but better
// to change things like the speed now rather than later.
ApplySettings();
}
#endif
const bool game_was_started = g_GameStarted;