summaryrefslogtreecommitdiffstats
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2022-07-15 03:42:56 +0200
committerGus Caplan <me@gus.host>2022-07-18 07:35:07 +0200
commit742f67908c191a71b204519a353fb5e42a9dea56 (patch)
tree73da44972adc2b3c2bd9f427c9afd9108673547f /src/yuzu/main.cpp
parentMerge pull request #8569 from merryhime/watchpoints (diff)
downloadyuzu-742f67908c191a71b204519a353fb5e42a9dea56.tar
yuzu-742f67908c191a71b204519a353fb5e42a9dea56.tar.gz
yuzu-742f67908c191a71b204519a353fb5e42a9dea56.tar.bz2
yuzu-742f67908c191a71b204519a353fb5e42a9dea56.tar.lz
yuzu-742f67908c191a71b204519a353fb5e42a9dea56.tar.xz
yuzu-742f67908c191a71b204519a353fb5e42a9dea56.tar.zst
yuzu-742f67908c191a71b204519a353fb5e42a9dea56.zip
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index ed802d329..e60d84054 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1131,6 +1131,7 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
OnPauseGame();
} else if (!emu_thread->IsRunning() && auto_paused && state == Qt::ApplicationActive) {
auto_paused = false;
+ RequestGameResume();
OnStartGame();
}
}
@@ -2570,6 +2571,7 @@ void GMainWindow::OnPauseContinueGame() {
if (emu_thread->IsRunning()) {
OnPauseGame();
} else {
+ RequestGameResume();
OnStartGame();
}
}
@@ -3749,6 +3751,21 @@ void GMainWindow::RequestGameExit() {
}
}
+void GMainWindow::RequestGameResume() {
+ auto& sm{system->ServiceManager()};
+ auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE");
+ auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE");
+
+ if (applet_oe != nullptr) {
+ applet_oe->GetMessageQueue()->RequestResume();
+ return;
+ }
+
+ if (applet_ae != nullptr) {
+ applet_ae->GetMessageQueue()->RequestResume();
+ }
+}
+
void GMainWindow::filterBarSetChecked(bool state) {
ui->action_Show_Filter_Bar->setChecked(state);
emit(OnToggleFilterBar());