diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-11-04 11:14:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-04 11:14:01 -0400 |
commit | 34101d8c5e8f8b3ce3027ba8ed40fb8666a21a0e (patch) | |
tree | 131d3da25af0ea80e4f760e74c328804c32aa782 /src/yuzu/main.cpp | |
parent | a80e0e7da506d6fdebf908d669749ce7d22db467 (diff) | |
parent | 6a7123826a426ed195257da24d75170bfc56f670 (diff) |
Merge pull request #11885 from liamwhite/stop-nagging-me
qt: remove duplicate exit confirmation setting
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index db9da6dc8..91aba118a 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2174,6 +2174,7 @@ void GMainWindow::ShutdownGame() { return; } + play_time_manager->Stop(); OnShutdownBegin(); OnEmulationStopTimeExpired(); OnEmulationStopped(); @@ -3484,7 +3485,7 @@ void GMainWindow::OnExecuteProgram(std::size_t program_index) { } void GMainWindow::OnExit() { - OnStopGame(); + ShutdownGame(); } void GMainWindow::OnSaveConfig() { @@ -4847,7 +4848,12 @@ bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installe } bool GMainWindow::ConfirmClose() { - if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) { + if (emu_thread == nullptr || + UISettings::values.confirm_before_stopping.GetValue() == ConfirmStop::Ask_Never) { + return true; + } + if (!system->GetExitLocked() && + UISettings::values.confirm_before_stopping.GetValue() == ConfirmStop::Ask_Based_On_Game) { return true; } const auto text = tr("Are you sure you want to close yuzu?"); @@ -4952,7 +4958,7 @@ bool GMainWindow::ConfirmChangeGame() { } bool GMainWindow::ConfirmForceLockedExit() { - if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) { + if (emu_thread == nullptr) { return true; } const auto text = tr("The currently running application has requested yuzu to not exit.\n\n" |