diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2019-09-22 00:17:46 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2019-10-07 13:44:09 +0200 |
commit | 29e15601f3374fca830be93c0c8f9b5df7b66a08 (patch) | |
tree | a5e96654163bb5862fb1181bb72c2db66609298d | |
parent | Merge pull request #2951 from lioncash/global (diff) | |
download | yuzu-29e15601f3374fca830be93c0c8f9b5df7b66a08.tar yuzu-29e15601f3374fca830be93c0c8f9b5df7b66a08.tar.gz yuzu-29e15601f3374fca830be93c0c8f9b5df7b66a08.tar.bz2 yuzu-29e15601f3374fca830be93c0c8f9b5df7b66a08.tar.lz yuzu-29e15601f3374fca830be93c0c8f9b5df7b66a08.tar.xz yuzu-29e15601f3374fca830be93c0c8f9b5df7b66a08.tar.zst yuzu-29e15601f3374fca830be93c0c8f9b5df7b66a08.zip |
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 13 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.h | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 41bddf870..ba1da4181 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -195,7 +195,7 @@ Hid::Hid(Core::System& system) : ServiceFramework("hid"), system(system) { {101, &Hid::GetSupportedNpadStyleSet, "GetSupportedNpadStyleSet"}, {102, &Hid::SetSupportedNpadIdType, "SetSupportedNpadIdType"}, {103, &Hid::ActivateNpad, "ActivateNpad"}, - {104, nullptr, "DeactivateNpad"}, + {104, &Hid::DeactivateNpad, "DeactivateNpad"}, {106, &Hid::AcquireNpadStyleSetUpdateEventHandle, "AcquireNpadStyleSetUpdateEventHandle"}, {107, &Hid::DisconnectNpad, "DisconnectNpad"}, {108, &Hid::GetPlayerLedPattern, "GetPlayerLedPattern"}, @@ -470,6 +470,17 @@ void Hid::ActivateNpad(Kernel::HLERequestContext& ctx) { applet_resource->ActivateController(HidController::NPad); } +void Hid::DeactivateNpad(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto applet_resource_user_id{rp.Pop<u64>()}; + + LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + applet_resource->DeactivateController(HidController::NPad); +} + void Hid::AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto npad_id{rp.Pop<u32>()}; diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index 35b663679..01852e019 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h @@ -99,6 +99,7 @@ private: void GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx); void SetSupportedNpadIdType(Kernel::HLERequestContext& ctx); void ActivateNpad(Kernel::HLERequestContext& ctx); + void DeactivateNpad(Kernel::HLERequestContext& ctx); void AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx); void DisconnectNpad(Kernel::HLERequestContext& ctx); void GetPlayerLedPattern(Kernel::HLERequestContext& ctx); |