Have the user confirm exit if online

This commit is contained in:
Henrik Rydgård 2025-02-17 15:45:31 -06:00
parent d7ebed2d66
commit ac8761d4c9
45 changed files with 55 additions and 50 deletions

View file

@ -595,18 +595,23 @@ UI::EventReturn GamePauseScreen::OnExit(UI::EventParams &e) {
// If RAIntegration has dirty info, ask for confirmation.
if (Achievements::RAIntegrationDirty()) {
auto ac = GetI18NCategory(I18NCat::ACHIEVEMENTS);
confirmMessage = ac->T("You have unsaved RAIntegration changes. Exit?");
confirmMessage = ac->T("You have unsaved RAIntegration changes.");
confirmMessage += '\n';
}
if (IsNetworkConnected()) {
auto nw = GetI18NCategory(I18NCat::NETWORKING);
confirmMessage += nw->T("Network connected");
confirmMessage += '\n';
} else if (g_Config.iAskForExitConfirmationAfterSeconds > 0 && unsavedSeconds > g_Config.iAskForExitConfirmationAfterSeconds) {
auto di = GetI18NCategory(I18NCat::DIALOG);
std::string dlgMsg = ApplySafeSubstitutions(di->T("You haven't saved your progress for %1."), NiceTimeFormat((int)unsavedSeconds));
dlgMsg += '\n';
dlgMsg += '\n';
dlgMsg += di->T("Are you sure you want to exit? All unsaved progress will be lost.");
confirmMessage = dlgMsg;
confirmMessage = ApplySafeSubstitutions(di->T("You haven't saved your progress for %1."), NiceTimeFormat((int)unsavedSeconds));
}
if (!confirmMessage.empty()) {
auto di = GetI18NCategory(I18NCat::DIALOG);
confirmMessage += '\n';
confirmMessage += di->T("Are you sure you want to exit?");
screenManager()->push(new PromptScreen(gamePath_, confirmMessage, di->T("Yes"), di->T("No"), [=](bool result) {
if (result) {
if (g_Config.bPauseMenuExitsEmulator) {

View file

@ -372,7 +372,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP حجم
Active = نشط
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = ‎رجوع
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Geri
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Назад
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d segons
* PSP res = * resolució PSP
Active = Actiu
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Enrere
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d vteřin
* PSP res = * PSP rozlišení
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Zpět
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d sekunder
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Tilbage
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d Sekunden
* PSP res = * PSP Auflösung
Active = Aktiv
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Zurück
Bottom Center = Mitte unten
Bottom Left = links unten

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Poleboko'
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -388,7 +388,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Back
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d segundos
* PSP res = * resolución PSP
Active = Activo
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Atrás
Bottom Center = Inferior centrado
Bottom Left = Inferior izquierda

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d segundos
* PSP res = * PSP res
Active = Activo
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Atrás
Bottom Center = Abajo
Bottom Left = Abajo Izquierda

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d ثانیه
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = ‎بازگشت
Bottom Center = پایین وسط
Bottom Left = پایین چپ

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d sekuntia
* PSP res = * PSP res
Active = Aktiivinen
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Takaisin
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d secondes
* PSP res = × définition PSP
Active = Actif
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Retour
Bottom Center = En bas au centre
Bottom Left = En bas à gauche

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Atrás
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d δευτερόλεπτα
* PSP res = * ανάλυση PSP
Active = ΕΝΕΡΓΟ
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = ΠΙΣΩ
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = <<
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = <<
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d sekundi
* PSP res = * PSP res
Active = Aktivno
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Nazad
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d másodpercig
* PSP res = * PSP felbontás
Active = Aktív
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Vissza
Bottom Center = Alul középen
Bottom Left = Alul bal old.

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d detik
* PSP res = * PSP res
Active = Aktif
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Kembali
Bottom Center = Tengah bawah
Bottom Left = Kiri bawah

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d secondi
* PSP res = * definizione PSP
Active = Attiva
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Indietro
Bottom Center = In basso al centro
Bottom Left = In basso a sinistra

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d 秒
* PSP res = * PSP 解像度
Active = アクティブ
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = 戻る
Bottom Center = 下中央
Bottom Left = 左下

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d detik
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Bali
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d 초
* PSP res = * PSP 리소스
Active = 활성화
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = 뒤로가기
Bottom Center = 하단 중앙
Bottom Left = 하단 왼쪽

View file

@ -378,7 +378,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = چالاک
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = گەڕانەوە
Bottom Center = خوارەوە ناوەڕاست
Bottom Left = خوارەوە چەپ

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d ວິນາທີ
* PSP res = * ຂະໜາດຈໍ PSP
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = ຍ້ອນກັບ
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d sekundžių
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Atgal
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Balik
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP-resolutie
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Terug
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Tilbake
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d sekund
* PSP res = * rozdz. PSP
Active = Aktywny
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Powrót
Bottom Center = Dolny środek
Bottom Left = Dolne lewo

View file

@ -388,7 +388,7 @@ VFPU = VFPU
%d seconds = %d segundos
* PSP res = * Resolução do PSP
Active = Ativo
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Voltar
Bottom Center = No centro do rodapé
Bottom Left = A esquerda do rodapé

View file

@ -388,7 +388,7 @@ VFPU = VFPU
%d seconds = %d segundos
* PSP res = * Resolução da PSP
Active = Ativo
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Voltar
Bottom Center = Centro do rodapé
Bottom Left = A esquerda do rodapé

View file

@ -365,7 +365,7 @@ VFPU = VFPU
%d seconds = %d secunde
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Înapoi
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d секунд
* PSP res = * разр. PSP
Active = Активно
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Назад
Bottom Center = Внизу в центре
Bottom Left = Внизу слева

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d sekunder
* PSP res = * PSP res
Active = Aktiv
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Tillbaka
Bottom Center = Underkant centrerad
Bottom Left = Underkant vänster

View file

@ -365,7 +365,7 @@ VFPU = VFPU
%d seconds = %d na segundo
* PSP res = * PSP res
Active = Active
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Bumalik
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -374,7 +374,7 @@ VFPU = VFPU
%d seconds = %d วินาที
* PSP res = * ขนาดจอ PSP
Active = เปิดการทำงาน
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = ย้อนกลับ
Bottom Center = มุมล่างกลางจอ
Bottom Left = มุมล่างซ้ายจอ

View file

@ -366,7 +366,7 @@ VFPU = VFPU
%d seconds = %d saniye
* PSP res = * PSP Çözünürlüğü
Active = Etkin
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Geri
Bottom Center = Orta alt
Bottom Left = Sol alt

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d сек
* PSP res = * дозв. PSP
Active = Активно
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Назад
Bottom Center = Знизу центрально
Bottom Left = Знизу ліворуч

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d giây
* PSP res = * PSP như thật
Active = Hoạt động
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = Trở lại
Bottom Center = Bottom center
Bottom Left = Bottom left

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d秒
* PSP res = * PSP分辨率
Active = 激活
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = 返回
Bottom Center = 正下方
Bottom Left = 左下方

View file

@ -364,7 +364,7 @@ VFPU = VFPU
%d seconds = %d 秒
* PSP res = * PSP 解析度
Active = 啟用
Are you sure you want to exit? All unsaved progress will be lost. = Are you sure you want to exit? All unsaved progress will be lost.
Are you sure you want to exit? = Are you sure you want to exit?
Back = 返回
Bottom Center = 正下
Bottom Left = 左下