Skip to content

Commit

Permalink
Fixed keyboard host dpad up/down directions (#783)
Browse files Browse the repository at this point in the history
Fixed keyboard host dpad up/down directions regression for #764
Reverses a change made in #658
  • Loading branch information
mikepparks authored Jan 8, 2024
1 parent 7b3e60a commit 7a22b1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/addons/keyboard_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void KeyboardHostAddon::process_kbd_report(uint8_t dev_addr, hid_keyboard_report
const GamepadOptions& gamepadOptions = Storage::getInstance().getGamepadOptions();

_keyboard_host_state.dpad |=
((keycode == _keyboard_host_mapDpadUp.key) ? _keyboard_host_mapDpadDown.buttonMask : _keyboard_host_state.dpad)
| ((keycode == _keyboard_host_mapDpadDown.key) ? _keyboard_host_mapDpadUp.buttonMask : _keyboard_host_state.dpad)
((keycode == _keyboard_host_mapDpadUp.key) ? _keyboard_host_mapDpadUp.buttonMask : _keyboard_host_state.dpad)
| ((keycode == _keyboard_host_mapDpadDown.key) ? _keyboard_host_mapDpadDown.buttonMask : _keyboard_host_state.dpad)
| ((keycode == _keyboard_host_mapDpadLeft.key) ? _keyboard_host_mapDpadLeft.buttonMask : _keyboard_host_state.dpad)
| ((keycode == _keyboard_host_mapDpadRight.key) ? _keyboard_host_mapDpadRight.buttonMask : _keyboard_host_state.dpad)
;
Expand Down

0 comments on commit 7a22b1d

Please sign in to comment.