diff options
author | german77 <juangerman-13@hotmail.com> | 2024-01-06 22:04:14 -0600 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2024-01-06 23:30:43 -0600 |
commit | 5105b900179e639a766c8013e7d24551e6a58a95 (patch) | |
tree | f4830e36817e18511b6fbdaeb97bc1aa7f009581 /src/core | |
parent | 3516a2d0bff5a7d6a22ff1b4fb7cbc021c6b4d1e (diff) |
service: hid: Implement GetLastActiveNpad
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/service/hid/hid_system_server.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/hid_system_server.cpp b/src/core/hle/service/hid/hid_system_server.cpp index 94d566650..3a0cb3cb1 100644 --- a/src/core/hle/service/hid/hid_system_server.cpp +++ b/src/core/hle/service/hid/hid_system_server.cpp @@ -275,11 +275,14 @@ void IHidSystemServer::DisableAssigningSingleOnSlSrPress(HLERequestContext& ctx) } void IHidSystemServer::GetLastActiveNpad(HLERequestContext& ctx) { - LOG_DEBUG(Service_HID, "(STUBBED) called"); // Spams a lot when controller applet is running + Core::HID::NpadIdType npad_id{}; + const Result result = GetResourceManager()->GetNpad()->GetLastActiveNpad(npad_id); + + LOG_DEBUG(Service_HID, "called, npad_id={}", npad_id); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(ResultSuccess); - rb.Push(0); // Dont forget to fix this + rb.Push(result); + rb.PushEnum(npad_id); } void IHidSystemServer::ApplyNpadSystemCommonPolicyFull(HLERequestContext& ctx) { |