Fix a crash when shutting down emulation from the Hardcore mode confirmation prompt

This commit is contained in:
Silent 2021-06-11 00:33:12 +02:00
parent 44da13358d
commit ee0e7f15c1
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 1 additions and 4 deletions

View File

@ -1203,6 +1203,7 @@ static bool ConfirmChallengeModeEnable()
if (!s_host_interface->ConfirmMessage(message))
return false;
SaveAndApplySettings();
s_host_interface->PowerOffSystem(s_host_interface->ShouldSaveResumeState());
return true;
}
@ -2266,8 +2267,6 @@ void DrawSettingsWindow()
s_host_interface->RunLater([]() {
if (!ConfirmChallengeModeEnable())
s_host_interface->GetSettingsInterface()->SetBoolValue("Cheevos", "Enabled", false);
else
SaveAndApplySettings();
});
}
@ -2293,8 +2292,6 @@ void DrawSettingsWindow()
s_host_interface->RunLater([]() {
if (!ConfirmChallengeModeEnable())
s_host_interface->GetSettingsInterface()->SetBoolValue("Cheevos", "ChallengeMode", false);
else
SaveAndApplySettings();
});
}