From eaf0c4af11c24a6b99979c77ae7a75c54925f4ff Mon Sep 17 00:00:00 2001 From: german77 Date: Fri, 2 Apr 2021 09:03:11 -0500 Subject: HID: Fix SL and SR buttons for right joycon --- src/core/hle/service/hid/controllers/npad.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core/hle/service') diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 70b9f3824..1df62f98e 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -413,12 +413,16 @@ void Controller_NPad::RequestPadStateUpdate(u32 npad_id) { lstick_entry.y = static_cast(stick_l_y_f * HID_JOYSTICK_MAX); } - if (controller_type == NPadControllerType::JoyLeft || - controller_type == NPadControllerType::JoyRight) { + if (controller_type == NPadControllerType::JoyLeft) { pad_state.left_sl.Assign(button_state[SL - BUTTON_HID_BEGIN]->GetStatus()); pad_state.left_sr.Assign(button_state[SR - BUTTON_HID_BEGIN]->GetStatus()); } + if (controller_type == NPadControllerType::JoyRight) { + pad_state.right_sl.Assign(button_state[SL - BUTTON_HID_BEGIN]->GetStatus()); + pad_state.right_sr.Assign(button_state[SR - BUTTON_HID_BEGIN]->GetStatus()); + } + if (controller_type == NPadControllerType::GameCube) { trigger_entry.l_analog = static_cast( button_state[ZL - BUTTON_HID_BEGIN]->GetStatus() ? HID_TRIGGER_MAX : 0); -- cgit v1.2.3