summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2021-12-08 00:28:16 +0100
committerGitHub <noreply@github.com>2021-12-08 00:28:16 +0100
commit5b2cb22a049f324dc59f47b032c5340974f72d84 (patch)
tree221dd8ebea5511615320d74d07e7fd82b472fe62
parentMerge pull request #7522 from ameerj/shader-recompiler-filenames (diff)
parentFixed #7502 (diff)
downloadyuzu-5b2cb22a049f324dc59f47b032c5340974f72d84.tar
yuzu-5b2cb22a049f324dc59f47b032c5340974f72d84.tar.gz
yuzu-5b2cb22a049f324dc59f47b032c5340974f72d84.tar.bz2
yuzu-5b2cb22a049f324dc59f47b032c5340974f72d84.tar.lz
yuzu-5b2cb22a049f324dc59f47b032c5340974f72d84.tar.xz
yuzu-5b2cb22a049f324dc59f47b032c5340974f72d84.tar.zst
yuzu-5b2cb22a049f324dc59f47b032c5340974f72d84.zip
-rw-r--r--src/yuzu/main.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 5a9dec8f3..cc84ea11c 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1082,14 +1082,15 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
state != Qt::ApplicationActive) {
LOG_DEBUG(Frontend, "ApplicationState unusual flag: {} ", state);
}
- if (ui->action_Pause->isEnabled() &&
- (state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
- auto_paused = true;
- OnPauseGame();
- } else if (emulation_running && !emu_thread->IsRunning() && auto_paused &&
- state == Qt::ApplicationActive) {
- auto_paused = false;
- OnStartGame();
+ if (emulation_running) {
+ if (emu_thread->IsRunning() &&
+ (state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
+ auto_paused = true;
+ OnPauseGame();
+ } else if (!emu_thread->IsRunning() && auto_paused && state == Qt::ApplicationActive) {
+ auto_paused = false;
+ OnStartGame();
+ }
}
}