From 7224ec57f6c7a0df82f3f4e0aa06f47fd1723cf9 Mon Sep 17 00:00:00 2001 From: vitor-k Date: Wed, 11 Sep 2019 21:53:26 -0300 Subject: [PATCH] Only auto unpause when auto paused --- src/citra_qt/main.cpp | 4 +++- src/citra_qt/main.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 0fc10508eb..a401ce2d9b 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -503,9 +503,11 @@ void GMainWindow::OnLoseFocus(Qt::ApplicationState state) { if (ui.action_Pause->isEnabled() && (state == Qt::ApplicationSuspended || state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) { + auto_paused = true; OnPauseGame(); } - if (ui.action_Start->isEnabled() && state == Qt::ApplicationActive) { + if (ui.action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) { + auto_paused = false; OnStartGame(); } } diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 82c94972cd..9cb6886d39 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -233,6 +233,8 @@ private: // The path to the game currently running QString game_path; + bool auto_paused = false; + // Movie bool movie_record_on_start = false; QString movie_record_path;