mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 10:51:50 -05:00
Merge pull request #6997 from ameerj/stop-emulation-confirmation
main: Apply confirm exit setting in exit locked scenarios
This commit is contained in:
commit
9907302465
1 changed files with 9 additions and 11 deletions
|
@ -3174,12 +3174,11 @@ std::optional<u64> GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProv
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GMainWindow::ConfirmClose() {
|
bool GMainWindow::ConfirmClose() {
|
||||||
if (emu_thread == nullptr || !UISettings::values.confirm_before_closing)
|
if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
QMessageBox::StandardButton answer =
|
const auto text = tr("Are you sure you want to close yuzu?");
|
||||||
QMessageBox::question(this, tr("yuzu"), tr("Are you sure you want to close yuzu?"),
|
const auto answer = QMessageBox::question(this, tr("yuzu"), text);
|
||||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
|
||||||
return answer != QMessageBox::No;
|
return answer != QMessageBox::No;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3261,14 +3260,13 @@ bool GMainWindow::ConfirmChangeGame() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GMainWindow::ConfirmForceLockedExit() {
|
bool GMainWindow::ConfirmForceLockedExit() {
|
||||||
if (emu_thread == nullptr)
|
if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
const auto text = tr("The currently running application has requested yuzu to not exit.\n\n"
|
||||||
|
"Would you like to bypass this and exit anyway?");
|
||||||
|
|
||||||
const auto answer =
|
const auto answer = QMessageBox::question(this, tr("yuzu"), text);
|
||||||
QMessageBox::question(this, tr("yuzu"),
|
|
||||||
tr("The currently running application has requested yuzu to not "
|
|
||||||
"exit.\n\nWould you like to bypass this and exit anyway?"),
|
|
||||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
|
||||||
return answer != QMessageBox::No;
|
return answer != QMessageBox::No;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue