diff options
author | Liam <byteslice@airmail.cc> | 2024-01-02 18:29:03 -0500 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-29 20:17:33 -0500 |
commit | 182137a9a4b09c8188d2cbffa312550c5dc83641 (patch) | |
tree | af62d2ecf774e7790c227cb0984e5392deca5afe /src/yuzu/main.cpp | |
parent | 3155f4e96d10904f4a207e465f20fb4b25043f5c (diff) |
am: migrate global state to per-applet state structure
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 02508b20d..4e5c4da53 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -4783,36 +4783,12 @@ void GMainWindow::RequestGameExit() { return; } - auto& sm{system->ServiceManager()}; - auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE"); - auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE"); - bool has_signalled = false; - system->SetExitRequested(true); - - if (applet_oe != nullptr) { - applet_oe->GetMessageQueue()->RequestExit(); - has_signalled = true; - } - - if (applet_ae != nullptr && !has_signalled) { - applet_ae->GetMessageQueue()->RequestExit(); - } + system->GetAppletManager().RequestExit(); } 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(); - } + system->GetAppletManager().RequestResume(); } void GMainWindow::filterBarSetChecked(bool state) { |