summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-09-18 16:10:30 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-09-18 16:10:30 +0200
commitab961e07014cb308cc983fa869696bf5cb9a0c7d (patch)
tree3ff650bd2d018c916ca331cc7cd27f941e6e4b0d /src/core/hle/service/hid/hid.cpp
parentMerge pull request #4323 from ReinUsesLisp/no-spin (diff)
downloadyuzu-ab961e07014cb308cc983fa869696bf5cb9a0c7d.tar
yuzu-ab961e07014cb308cc983fa869696bf5cb9a0c7d.tar.gz
yuzu-ab961e07014cb308cc983fa869696bf5cb9a0c7d.tar.bz2
yuzu-ab961e07014cb308cc983fa869696bf5cb9a0c7d.tar.lz
yuzu-ab961e07014cb308cc983fa869696bf5cb9a0c7d.tar.xz
yuzu-ab961e07014cb308cc983fa869696bf5cb9a0c7d.tar.zst
yuzu-ab961e07014cb308cc983fa869696bf5cb9a0c7d.zip
Diffstat (limited to 'src/core/hle/service/hid/hid.cpp')
-rw-r--r--src/core/hle/service/hid/hid.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index bd3c2f26b..d300ce25d 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -714,8 +714,11 @@ void Hid::SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
const auto applet_resource_user_id{rp.Pop<u64>()};
const auto mode{rp.Pop<u64>()};
- LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}, mode={}",
- applet_resource_user_id, mode);
+ LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}, mode={}", applet_resource_user_id,
+ mode);
+
+ applet_resource->GetController<Controller_NPad>(HidController::NPad)
+ .SetNpadHandheldActivationMode(Controller_NPad::NpadHandheldActivationMode{mode});
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
@@ -725,11 +728,13 @@ void Hid::GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto applet_resource_user_id{rp.Pop<u64>()};
- LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
- applet_resource_user_id);
+ LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
- IPC::ResponseBuilder rb{ctx, 2};
+ IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
+ rb.Push<u64>(
+ static_cast<u64>(applet_resource->GetController<Controller_NPad>(HidController::NPad)
+ .GetNpadHandheldActivationMode()));
}
void Hid::SwapNpadAssignment(Kernel::HLERequestContext& ctx) {