From eb58f852f8cd961853120e756e5cd91ad8c33bfd Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 22 Jan 2018 13:46:36 -0500 Subject: AppletOE: Make ISelfController keep a reference to nvflinger. It'll be needed when we implement CreateManagedDisplayLayer. --- src/core/hle/service/am/applet_oe.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/core/hle/service/am/applet_oe.cpp') diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index b4a6ad232..f593840b3 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp @@ -7,6 +7,7 @@ #include "core/hle/kernel/event.h" #include "core/hle/service/am/applet_oe.h" #include "core/hle/service/apm/apm.h" +#include "core/hle/service/nvflinger/nvflinger.h" namespace Service { namespace AM { @@ -53,7 +54,8 @@ public: class ISelfController final : public ServiceFramework { public: - ISelfController() : ServiceFramework("ISelfController") { + ISelfController(std::shared_ptr nvflinger) + : ServiceFramework("ISelfController"), nvflinger(std::move(nvflinger)) { static const FunctionInfo functions[] = { {1, &ISelfController::LockExit, "LockExit"}, {2, &ISelfController::UnlockExit, "UnlockExit"}, @@ -144,6 +146,8 @@ private: LOG_WARNING(Service, "(STUBBED) called"); } + + std::shared_ptr nvflinger; }; class ICommonStateGetter final : public ServiceFramework { @@ -367,7 +371,8 @@ public: class IApplicationProxy final : public ServiceFramework { public: - IApplicationProxy() : ServiceFramework("IApplicationProxy") { + IApplicationProxy(std::shared_ptr nvflinger) + : ServiceFramework("IApplicationProxy"), nvflinger(std::move(nvflinger)) { static const FunctionInfo functions[] = { {0, &IApplicationProxy::GetCommonStateGetter, "GetCommonStateGetter"}, {1, &IApplicationProxy::GetSelfController, "GetSelfController"}, @@ -413,7 +418,7 @@ private: void GetSelfController(Kernel::HLERequestContext& ctx) { IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface(); + rb.PushIpcInterface(nvflinger); LOG_DEBUG(Service, "called"); } @@ -437,16 +442,19 @@ private: rb.PushIpcInterface(); LOG_DEBUG(Service, "called"); } + + std::shared_ptr nvflinger; }; void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) { IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface(); + rb.PushIpcInterface(nvflinger); LOG_DEBUG(Service, "called"); } -AppletOE::AppletOE() : ServiceFramework("appletOE") { +AppletOE::AppletOE(std::shared_ptr nvflinger) + : ServiceFramework("appletOE"), nvflinger(std::move(nvflinger)) { static const FunctionInfo functions[] = { {0x00000000, &AppletOE::OpenApplicationProxy, "OpenApplicationProxy"}, }; -- cgit v1.2.3