summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-22 23:09:09 +0100
committerGitHub <noreply@github.com>2018-01-22 23:09:09 +0100
commitde2e5a0855c11f8ef284708d2b55fa156594d1c4 (patch)
treef2ec22879261414c3c2e50001ea944978999d272 /src/core/hle/service/hid/hid.cpp
parentMerge pull request #132 from Subv/nvflinger (diff)
parentStub OpenAudioOut and fix a issue with HID IAppletResource being created more than once (diff)
downloadyuzu-de2e5a0855c11f8ef284708d2b55fa156594d1c4.tar
yuzu-de2e5a0855c11f8ef284708d2b55fa156594d1c4.tar.gz
yuzu-de2e5a0855c11f8ef284708d2b55fa156594d1c4.tar.bz2
yuzu-de2e5a0855c11f8ef284708d2b55fa156594d1c4.tar.lz
yuzu-de2e5a0855c11f8ef284708d2b55fa156594d1c4.tar.xz
yuzu-de2e5a0855c11f8ef284708d2b55fa156594d1c4.tar.zst
yuzu-de2e5a0855c11f8ef284708d2b55fa156594d1c4.zip
Diffstat (limited to 'src/core/hle/service/hid/hid.cpp')
-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",