From 8d8bc8fee72deb8221f7f302630bc731b48a0ce0 Mon Sep 17 00:00:00 2001 From: vitor-k Date: Wed, 18 Sep 2019 15:26:38 -0300 Subject: [PATCH] small changes to ApplicationState handling, just in case --- src/citra_qt/configuration/configure_general.ui | 2 +- src/citra_qt/main.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/configuration/configure_general.ui b/src/citra_qt/configuration/configure_general.ui index 74b9da7adb..2a461a05db 100644 --- a/src/citra_qt/configuration/configure_general.ui +++ b/src/citra_qt/configuration/configure_general.ui @@ -29,7 +29,7 @@ - + Pause emulation when in background diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 45344126ae..482dd6f100 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -503,12 +503,15 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) { if (!UISettings::values.pause_when_in_background) { return; } + if (state != Qt::ApplicationHidden && state != Qt::ApplicationInactive && + state != Qt::ApplicationActive) { + LOG_DEBUG(Frontend, "ApplicationState unusual flag: {} ", state); + } if (ui.action_Pause->isEnabled() && (state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) { auto_paused = true; OnPauseGame(); - } - if (ui.action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) { + } else if (ui.action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) { auto_paused = false; OnStartGame(); }