Achievements: Remove ConfirmHardcoreModeDisable

No longer needed.
This commit is contained in:
Stenzek
2025-11-27 17:19:27 +10:00
parent 249f8cf4a0
commit 93f3be46f2
2 changed files with 3 additions and 19 deletions

View File

@@ -2091,22 +2091,7 @@ void Achievements::Logout()
ClearProgressDatabase();
}
bool Achievements::ConfirmHardcoreModeDisable(const char* trigger)
{
// I really hope this doesn't deadlock :/
const bool confirmed = Host::ConfirmMessage(
TRANSLATE("Achievements", "Confirm Hardcore Mode Disable"),
fmt::format(TRANSLATE_FS("Achievements", "{0} cannot be performed while hardcore mode is active. Do you "
"want to disable hardcore mode? {0} will be cancelled if you select No."),
trigger));
if (!confirmed)
return false;
DisableHardcoreMode(true, true);
return true;
}
void Achievements::ConfirmHardcoreModeDisableAsync(const char* trigger, std::function<void(bool)> callback)
void Achievements::ConfirmHardcoreModeDisableAsync(std::string_view trigger, std::function<void(bool)> callback)
{
Host::ConfirmMessageAsync(
TRANSLATE_STR("Achievements", "Confirm Hardcore Mode Disable"),

View File

@@ -116,9 +116,8 @@ void Logout();
/// Forces hardcore mode off until next reset.
void DisableHardcoreMode(bool show_message, bool display_game_summary);
/// Prompts the user to disable hardcore mode, if they agree, returns true.
bool ConfirmHardcoreModeDisable(const char* trigger);
void ConfirmHardcoreModeDisableAsync(const char* trigger, std::function<void(bool)> callback);
/// Prompts the user to disable hardcore mode. Invokes callback with result.
void ConfirmHardcoreModeDisableAsync(std::string_view trigger, std::function<void(bool)> callback);
/// Returns true if hardcore mode is active, and functionality should be restricted.
bool IsHardcoreModeActive();