summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp
diff options
context:
space:
mode:
authorDavid <25727384+ogniK5377@users.noreply.github.com>2020-09-30 13:24:11 +0200
committerGitHub <noreply@github.com>2020-09-30 13:24:11 +0200
commit4d0ae1a17a031488eadfa9133dac157fb71900c0 (patch)
tree166c4c4e09b828b4c987c6aacf00f5a041a79588 /src/core/hle/service/hid/hid.cpp
parentMerge pull request #4726 from lioncash/applet (diff)
parentFirst implementation of controller rumble (diff)
downloadyuzu-4d0ae1a17a031488eadfa9133dac157fb71900c0.tar
yuzu-4d0ae1a17a031488eadfa9133dac157fb71900c0.tar.gz
yuzu-4d0ae1a17a031488eadfa9133dac157fb71900c0.tar.bz2
yuzu-4d0ae1a17a031488eadfa9133dac157fb71900c0.tar.lz
yuzu-4d0ae1a17a031488eadfa9133dac157fb71900c0.tar.xz
yuzu-4d0ae1a17a031488eadfa9133dac157fb71900c0.tar.zst
yuzu-4d0ae1a17a031488eadfa9133dac157fb71900c0.zip
Diffstat (limited to 'src/core/hle/service/hid/hid.cpp')
-rw-r--r--src/core/hle/service/hid/hid.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 9a7e5e265..90a71ab1c 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -817,18 +817,18 @@ void Hid::EndPermitVibrationSession(Kernel::HLERequestContext& ctx) {
void Hid::SendVibrationValue(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
- const auto controller_id{rp.Pop<u32>()};
+ const auto controller{rp.Pop<u32>()};
const auto vibration_values{rp.PopRaw<Controller_NPad::Vibration>()};
const auto applet_resource_user_id{rp.Pop<u64>()};
- LOG_DEBUG(Service_HID, "called, controller_id={}, applet_resource_user_id={}", controller_id,
+ LOG_DEBUG(Service_HID, "called, controller={}, applet_resource_user_id={}", controller,
applet_resource_user_id);
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
applet_resource->GetController<Controller_NPad>(HidController::NPad)
- .VibrateController({controller_id}, {vibration_values});
+ .VibrateController({controller}, {vibration_values});
}
void Hid::SendVibrationValues(Kernel::HLERequestContext& ctx) {
@@ -846,8 +846,6 @@ void Hid::SendVibrationValues(Kernel::HLERequestContext& ctx) {
std::memcpy(controller_list.data(), controllers.data(), controllers.size());
std::memcpy(vibration_list.data(), vibrations.data(), vibrations.size());
- std::transform(controller_list.begin(), controller_list.end(), controller_list.begin(),
- [](u32 controller_id) { return controller_id - 3; });
applet_resource->GetController<Controller_NPad>(HidController::NPad)
.VibrateController(controller_list, vibration_list);