From a3fa64fcc489d2cc1776807a37db3464dcc32686 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Fri, 14 Apr 2023 17:46:20 -0600 Subject: service: nfc: Create interface --- src/core/hle/service/nfp/nfp.cpp | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'src/core/hle/service/nfp/nfp.cpp') diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index 2714f4bea..2559fe598 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp @@ -152,16 +152,10 @@ private: void CreateUserInterface(HLERequestContext& ctx) { LOG_DEBUG(Service_NFP, "called"); - if (user_interface == nullptr) { - user_interface = std::make_shared(system); - } - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); - rb.PushIpcInterface(user_interface); + rb.PushIpcInterface(system); } - - std::shared_ptr user_interface; }; class ISystemManager final : public ServiceFramework { @@ -180,16 +174,10 @@ private: void CreateSystemInterface(HLERequestContext& ctx) { LOG_DEBUG(Service_NFP, "called"); - if (system_interface == nullptr) { - system_interface = std::make_shared(system); - } - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); - rb.PushIpcInterface(system_interface); + rb.PushIpcInterface(system); } - - std::shared_ptr system_interface; }; class IDebugManager final : public ServiceFramework { @@ -208,16 +196,10 @@ private: void CreateDebugInterface(HLERequestContext& ctx) { LOG_DEBUG(Service_NFP, "called"); - if (system_interface == nullptr) { - system_interface = std::make_shared(system); - } - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); - rb.PushIpcInterface(system_interface); + rb.PushIpcInterface(system); } - - std::shared_ptr system_interface; }; void LoopProcess(Core::System& system) { -- cgit v1.2.3