mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Integrate the exit reminder (you haven't saved..) in warnings from setting that require restart
Part of #21223
This commit is contained in:
@@ -1744,9 +1744,19 @@ void TriggerRestart(const char *why, bool editThenRestore, const Path &gamePath)
|
||||
System_RestartApp(param);
|
||||
}
|
||||
|
||||
// From PauseScreen
|
||||
std::string GetConfirmExitMessage();
|
||||
|
||||
void GameSettingsScreen::TriggerRestartOrDo(std::function<void()> callback) {
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
screenManager()->push(new UI::MessagePopupScreen(di->T("Restart"), di->T("Changing this setting requires PPSSPP to restart."), di->T("Restart"), di->T("Cancel"), [=](bool yes) {
|
||||
|
||||
std::string confirmExitMessage = GetConfirmExitMessage();
|
||||
if (!confirmExitMessage.empty()) {
|
||||
confirmExitMessage = "\n\n" + confirmExitMessage;
|
||||
}
|
||||
confirmExitMessage = std::string(di->T("Changing this setting requires PPSSPP to restart.")) + confirmExitMessage;
|
||||
|
||||
screenManager()->push(new UI::MessagePopupScreen(di->T("Restart"), confirmExitMessage, di->T("Restart"), di->T("Cancel"), [=](bool yes) {
|
||||
if (yes) {
|
||||
TriggerRestart("GameSettingsScreen::RenderingBackendYes", editGameSpecificThenRestore_, gamePath_);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user