diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 1 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 17 | ||||
| -rw-r--r-- | src/yuzu/main.h | 1 |
4 files changed, 23 insertions, 0 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 9c62ebc60..9116dd77c 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -636,6 +636,10 @@ void AppletMessageQueue::RequestExit() { | |||
| 636 | PushMessage(AppletMessage::Exit); | 636 | PushMessage(AppletMessage::Exit); |
| 637 | } | 637 | } |
| 638 | 638 | ||
| 639 | void AppletMessageQueue::RequestResume() { | ||
| 640 | PushMessage(AppletMessage::Resume); | ||
| 641 | } | ||
| 642 | |||
| 639 | void AppletMessageQueue::FocusStateChanged() { | 643 | void AppletMessageQueue::FocusStateChanged() { |
| 640 | PushMessage(AppletMessage::FocusStateChanged); | 644 | PushMessage(AppletMessage::FocusStateChanged); |
| 641 | } | 645 | } |
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 988ead215..53144427b 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -90,6 +90,7 @@ public: | |||
| 90 | AppletMessage PopMessage(); | 90 | AppletMessage PopMessage(); |
| 91 | std::size_t GetMessageCount() const; | 91 | std::size_t GetMessageCount() const; |
| 92 | void RequestExit(); | 92 | void RequestExit(); |
| 93 | void RequestResume(); | ||
| 93 | void FocusStateChanged(); | 94 | void FocusStateChanged(); |
| 94 | void OperationModeChanged(); | 95 | void OperationModeChanged(); |
| 95 | 96 | ||
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) { | |||
| 1131 | OnPauseGame(); | 1131 | OnPauseGame(); |
| 1132 | } else if (!emu_thread->IsRunning() && auto_paused && state == Qt::ApplicationActive) { | 1132 | } else if (!emu_thread->IsRunning() && auto_paused && state == Qt::ApplicationActive) { |
| 1133 | auto_paused = false; | 1133 | auto_paused = false; |
| 1134 | RequestGameResume(); | ||
| 1134 | OnStartGame(); | 1135 | OnStartGame(); |
| 1135 | } | 1136 | } |
| 1136 | } | 1137 | } |
| @@ -2570,6 +2571,7 @@ void GMainWindow::OnPauseContinueGame() { | |||
| 2570 | if (emu_thread->IsRunning()) { | 2571 | if (emu_thread->IsRunning()) { |
| 2571 | OnPauseGame(); | 2572 | OnPauseGame(); |
| 2572 | } else { | 2573 | } else { |
| 2574 | RequestGameResume(); | ||
| 2573 | OnStartGame(); | 2575 | OnStartGame(); |
| 2574 | } | 2576 | } |
| 2575 | } | 2577 | } |
| @@ -3749,6 +3751,21 @@ void GMainWindow::RequestGameExit() { | |||
| 3749 | } | 3751 | } |
| 3750 | } | 3752 | } |
| 3751 | 3753 | ||
| 3754 | void GMainWindow::RequestGameResume() { | ||
| 3755 | auto& sm{system->ServiceManager()}; | ||
| 3756 | auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE"); | ||
| 3757 | auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE"); | ||
| 3758 | |||
| 3759 | if (applet_oe != nullptr) { | ||
| 3760 | applet_oe->GetMessageQueue()->RequestResume(); | ||
| 3761 | return; | ||
| 3762 | } | ||
| 3763 | |||
| 3764 | if (applet_ae != nullptr) { | ||
| 3765 | applet_ae->GetMessageQueue()->RequestResume(); | ||
| 3766 | } | ||
| 3767 | } | ||
| 3768 | |||
| 3752 | void GMainWindow::filterBarSetChecked(bool state) { | 3769 | void GMainWindow::filterBarSetChecked(bool state) { |
| 3753 | ui->action_Show_Filter_Bar->setChecked(state); | 3770 | ui->action_Show_Filter_Bar->setChecked(state); |
| 3754 | emit(OnToggleFilterBar()); | 3771 | emit(OnToggleFilterBar()); |
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 8cf224c9c..09e37f152 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -244,6 +244,7 @@ private: | |||
| 244 | bool ConfirmChangeGame(); | 244 | bool ConfirmChangeGame(); |
| 245 | bool ConfirmForceLockedExit(); | 245 | bool ConfirmForceLockedExit(); |
| 246 | void RequestGameExit(); | 246 | void RequestGameExit(); |
| 247 | void RequestGameResume(); | ||
| 247 | void closeEvent(QCloseEvent* event) override; | 248 | void closeEvent(QCloseEvent* event) override; |
| 248 | 249 | ||
| 249 | private slots: | 250 | private slots: |