From 182137a9a4b09c8188d2cbffa312550c5dc83641 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 2 Jan 2024 18:29:03 -0500 Subject: am: migrate global state to per-applet state structure --- src/core/hle/service/am/system_applet_proxy.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/core/hle/service/am/system_applet_proxy.cpp') diff --git a/src/core/hle/service/am/system_applet_proxy.cpp b/src/core/hle/service/am/system_applet_proxy.cpp index d51a2c8db..e3013271b 100644 --- a/src/core/hle/service/am/system_applet_proxy.cpp +++ b/src/core/hle/service/am/system_applet_proxy.cpp @@ -20,10 +20,9 @@ namespace Service::AM { ISystemAppletProxy::ISystemAppletProxy(Nvnflinger::Nvnflinger& nvnflinger_, - std::shared_ptr msg_queue_, - Core::System& system_) - : ServiceFramework{system_, "ISystemAppletProxy"}, nvnflinger{nvnflinger_}, - msg_queue{std::move(msg_queue_)} { + std::shared_ptr applet_, Core::System& system_) + : ServiceFramework{system_, "ISystemAppletProxy"}, nvnflinger{nvnflinger_}, applet{std::move( + applet_)} { // clang-format off static const FunctionInfo functions[] = { {0, &ISystemAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"}, @@ -44,12 +43,14 @@ ISystemAppletProxy::ISystemAppletProxy(Nvnflinger::Nvnflinger& nvnflinger_, RegisterHandlers(functions); } +ISystemAppletProxy::~ISystemAppletProxy() = default; + void ISystemAppletProxy::GetCommonStateGetter(HLERequestContext& ctx) { LOG_DEBUG(Service_AM, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); - rb.PushIpcInterface(system, msg_queue); + rb.PushIpcInterface(system, applet); } void ISystemAppletProxy::GetSelfController(HLERequestContext& ctx) { @@ -57,7 +58,7 @@ void ISystemAppletProxy::GetSelfController(HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); - rb.PushIpcInterface(system, nvnflinger); + rb.PushIpcInterface(system, applet, nvnflinger); } void ISystemAppletProxy::GetWindowController(HLERequestContext& ctx) { @@ -65,7 +66,7 @@ void ISystemAppletProxy::GetWindowController(HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); - rb.PushIpcInterface(system); + rb.PushIpcInterface(system, applet); } void ISystemAppletProxy::GetAudioController(HLERequestContext& ctx) { @@ -89,7 +90,7 @@ void ISystemAppletProxy::GetLibraryAppletCreator(HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); - rb.PushIpcInterface(system); + rb.PushIpcInterface(system, applet); } void ISystemAppletProxy::GetHomeMenuFunctions(HLERequestContext& ctx) { @@ -121,7 +122,7 @@ void ISystemAppletProxy::GetAppletCommonFunctions(HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); - rb.PushIpcInterface(system); + rb.PushIpcInterface(system, applet); } void ISystemAppletProxy::GetDebugFunctions(HLERequestContext& ctx) { -- cgit v1.2.3