diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-04-02 21:48:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 21:48:04 +0200 |
commit | aca6ab64177f65599ce1f62d994e89f5fad04c7d (patch) | |
tree | cb00a37aae8a78737e525a6e4b449cd70eae72f1 /src/core/hle | |
parent | Merge pull request #6129 from degasus/cmake_libzip (diff) | |
parent | HID: Fix SL and SR buttons for right joycon (diff) | |
download | yuzu-aca6ab64177f65599ce1f62d994e89f5fad04c7d.tar yuzu-aca6ab64177f65599ce1f62d994e89f5fad04c7d.tar.gz yuzu-aca6ab64177f65599ce1f62d994e89f5fad04c7d.tar.bz2 yuzu-aca6ab64177f65599ce1f62d994e89f5fad04c7d.tar.lz yuzu-aca6ab64177f65599ce1f62d994e89f5fad04c7d.tar.xz yuzu-aca6ab64177f65599ce1f62d994e89f5fad04c7d.tar.zst yuzu-aca6ab64177f65599ce1f62d994e89f5fad04c7d.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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<s32>(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<s32>( button_state[ZL - BUTTON_HID_BEGIN]->GetStatus() ? HID_TRIGGER_MAX : 0); |