summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-01-22 21:27:55 +0100
committergdkchan <gab.dark.100@gmail.com>2018-01-22 21:27:55 +0100
commit832009bfdb360a9700c1d367ecfe0f84e32264a7 (patch)
tree55b40ec33c4799110a4b01f4115f925aac912c5f /src/core/hle/service/hid
parentAdded stubs for audio services. (#116) (diff)
downloadyuzu-832009bfdb360a9700c1d367ecfe0f84e32264a7.tar
yuzu-832009bfdb360a9700c1d367ecfe0f84e32264a7.tar.gz
yuzu-832009bfdb360a9700c1d367ecfe0f84e32264a7.tar.bz2
yuzu-832009bfdb360a9700c1d367ecfe0f84e32264a7.tar.lz
yuzu-832009bfdb360a9700c1d367ecfe0f84e32264a7.tar.xz
yuzu-832009bfdb360a9700c1d367ecfe0f84e32264a7.tar.zst
yuzu-832009bfdb360a9700c1d367ecfe0f84e32264a7.zip
Diffstat (limited to 'src/core/hle/service/hid')
-rw-r--r--src/core/hle/service/hid/hid.cpp7
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",