mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-29 06:36:41 +00:00
Merge pull request #6131 from german77/rightjoyconSLSR
HID: Fix SL and SR buttons for right joycon
This commit is contained in:
commit
aca6ab6417
|
@ -413,12 +413,16 @@ void Controller_NPad::RequestPadStateUpdate(u32 npad_id) {
|
||||||
lstick_entry.y = static_cast<s32>(stick_l_y_f * HID_JOYSTICK_MAX);
|
lstick_entry.y = static_cast<s32>(stick_l_y_f * HID_JOYSTICK_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controller_type == NPadControllerType::JoyLeft ||
|
if (controller_type == NPadControllerType::JoyLeft) {
|
||||||
controller_type == NPadControllerType::JoyRight) {
|
|
||||||
pad_state.left_sl.Assign(button_state[SL - BUTTON_HID_BEGIN]->GetStatus());
|
pad_state.left_sl.Assign(button_state[SL - BUTTON_HID_BEGIN]->GetStatus());
|
||||||
pad_state.left_sr.Assign(button_state[SR - 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) {
|
if (controller_type == NPadControllerType::GameCube) {
|
||||||
trigger_entry.l_analog = static_cast<s32>(
|
trigger_entry.l_analog = static_cast<s32>(
|
||||||
button_state[ZL - BUTTON_HID_BEGIN]->GetStatus() ? HID_TRIGGER_MAX : 0);
|
button_state[ZL - BUTTON_HID_BEGIN]->GetStatus() ? HID_TRIGGER_MAX : 0);
|
||||||
|
|
Loading…
Reference in a new issue