diff options
Diffstat (limited to 'src/core/hle/service/hid/hid.cpp')
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index be7a6ff65..d99e9c505 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -162,8 +162,13 @@ public: ~Hid() = default; private: + Kernel::SharedPtr<Kernel::ClientPort> client_port; + void CreateAppletResource(Kernel::HLERequestContext& ctx) { - auto client_port = std::make_shared<IAppletResource>()->CreatePort(); + if (client_port == nullptr) { + client_port = std::make_shared<IAppletResource>()->CreatePort(); + } + auto session = client_port->Connect(); if (session.Succeeded()) { LOG_DEBUG(Service, "called, initialized IAppletResource -> session=%u", |