diff options
author | bunnei <bunneidev@gmail.com> | 2018-01-22 23:09:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-22 23:09:09 +0100 |
commit | de2e5a0855c11f8ef284708d2b55fa156594d1c4 (patch) | |
tree | f2ec22879261414c3c2e50001ea944978999d272 /src/core/hle/service/hid/hid.cpp | |
parent | Merge pull request #132 from Subv/nvflinger (diff) | |
parent | Stub OpenAudioOut and fix a issue with HID IAppletResource being created more than once (diff) | |
download | yuzu-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.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", |