System: Confirm HC disable on undo load state/reset

Again, no issue since it was unconditionally disabling, but this gives
the user the opportunity to cancel it.
This commit is contained in:
Stenzek
2025-11-27 17:21:47 +10:00
parent 08f357f0d7
commit 7b6fd224af

View File

@@ -5304,6 +5304,15 @@ void System::UndoLoadState()
if (!IsValid() || !s_state.undo_load_state.has_value())
return;
if (Achievements::IsHardcoreModeActive())
{
Achievements::ConfirmHardcoreModeDisableAsync(TRANSLATE_SV("System", "Undo load state"), [](bool result) {
if (result)
Host::RunOnCPUThread(&System::UndoLoadState);
});
return;
}
std::string osd_key = "UndoLoadState";
std::string osd_title = TRANSLATE_STR("System", "Undo Load State");