summaryrefslogtreecommitdiffstats
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-08-26 23:12:05 +0200
committerLiam <byteslice@airmail.cc>2023-08-26 23:12:05 +0200
commitb7523d6fa77a963409d5fbfec4879c22a6ef9f3f (patch)
treed9b7acc75eae4c216aeb39a3be6f3418fe3c894d /src/yuzu/main.cpp
parentMerge pull request #11377 from BenjaminHalko/reverse-slider-input (diff)
downloadyuzu-b7523d6fa77a963409d5fbfec4879c22a6ef9f3f.tar
yuzu-b7523d6fa77a963409d5fbfec4879c22a6ef9f3f.tar.gz
yuzu-b7523d6fa77a963409d5fbfec4879c22a6ef9f3f.tar.bz2
yuzu-b7523d6fa77a963409d5fbfec4879c22a6ef9f3f.tar.lz
yuzu-b7523d6fa77a963409d5fbfec4879c22a6ef9f3f.tar.xz
yuzu-b7523d6fa77a963409d5fbfec4879c22a6ef9f3f.tar.zst
yuzu-b7523d6fa77a963409d5fbfec4879c22a6ef9f3f.zip
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 8e933af64..aa7e9156a 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2010,8 +2010,16 @@ bool GMainWindow::OnShutdownBegin() {
emit EmulationStopping();
+ int shutdown_time = 1000;
+
+ if (system->DebuggerEnabled()) {
+ shutdown_time = 0;
+ } else if (system->GetExitLocked()) {
+ shutdown_time = 5000;
+ }
+
shutdown_timer.setSingleShot(true);
- shutdown_timer.start(system->DebuggerEnabled() ? 0 : 5000);
+ shutdown_timer.start(shutdown_time);
connect(&shutdown_timer, &QTimer::timeout, this, &GMainWindow::OnEmulationStopTimeExpired);
connect(emu_thread.get(), &QThread::finished, this, &GMainWindow::OnEmulationStopped);
@@ -3261,7 +3269,7 @@ void GMainWindow::OnPauseContinueGame() {
}
void GMainWindow::OnStopGame() {
- if (system->GetExitLock() && !ConfirmForceLockedExit()) {
+ if (system->GetExitLocked() && !ConfirmForceLockedExit()) {
return;
}
@@ -4514,6 +4522,8 @@ void GMainWindow::RequestGameExit() {
auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE");
bool has_signalled = false;
+ system->SetExitRequested(true);
+
if (applet_oe != nullptr) {
applet_oe->GetMessageQueue()->RequestExit();
has_signalled = true;