diff options
author | Adam Heinermann <aheinerm@gmail.com> | 2021-12-05 08:06:56 +0100 |
---|---|---|
committer | Adam Heinermann <aheinerm@gmail.com> | 2021-12-05 08:22:39 +0100 |
commit | 722005697415463d1708b896d903b592086f134e (patch) | |
tree | 6f1260f81d552e7a7c58cff78de6ebf7bfa888c6 | |
parent | Merge pull request #7467 from liushuyu/fix-linux-decoding (diff) | |
download | yuzu-722005697415463d1708b896d903b592086f134e.tar yuzu-722005697415463d1708b896d903b592086f134e.tar.gz yuzu-722005697415463d1708b896d903b592086f134e.tar.bz2 yuzu-722005697415463d1708b896d903b592086f134e.tar.lz yuzu-722005697415463d1708b896d903b592086f134e.tar.xz yuzu-722005697415463d1708b896d903b592086f134e.tar.zst yuzu-722005697415463d1708b896d903b592086f134e.zip |
-rw-r--r-- | src/yuzu/main.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f266fd963..77f2375ea 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(); + } } } |