Merge pull request #2251 from CookiePLMonster/fullscreen-ui-exit-crash

Fix a crash when shutting down emulation from the Hardcore mode confirmation prompt
This commit is contained in:
Connor McLaughlin 2021-06-15 23:09:16 +10:00 committed by GitHub
commit 0e01a65e78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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