diff options
| author | Ryan <fauxpark@gmail.com> | 2022-10-25 01:50:33 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-24 15:50:33 +0100 |
| commit | 6bbe8b6eddc56d43f4db07c665bf1791ea2ab871 (patch) | |
| tree | c19abffc806d190fcb89b56bc624d7b42cc8939e /quantum/process_keycode/process_joystick.c | |
| parent | 64ca14feea586442516a2ec50d7335445f5f08f6 (diff) | |
Normalise Joystick and Programmable Button keycodes (#18832)
Diffstat (limited to 'quantum/process_keycode/process_joystick.c')
| -rw-r--r-- | quantum/process_keycode/process_joystick.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/quantum/process_keycode/process_joystick.c b/quantum/process_keycode/process_joystick.c index af69d3aa05..c4c6fb59a8 100644 --- a/quantum/process_keycode/process_joystick.c +++ b/quantum/process_keycode/process_joystick.c | |||
| @@ -19,11 +19,11 @@ | |||
| 19 | 19 | ||
| 20 | bool process_joystick(uint16_t keycode, keyrecord_t *record) { | 20 | bool process_joystick(uint16_t keycode, keyrecord_t *record) { |
| 21 | switch (keycode) { | 21 | switch (keycode) { |
| 22 | case JS_BUTTON0 ... JS_BUTTON_MAX: | 22 | case QK_JOYSTICK_BUTTON_MIN ... QK_JOYSTICK_BUTTON_MAX: |
| 23 | if (record->event.pressed) { | 23 | if (record->event.pressed) { |
| 24 | register_joystick_button(keycode - JS_BUTTON0); | 24 | register_joystick_button(keycode - QK_JOYSTICK_BUTTON_MIN); |
| 25 | } else { | 25 | } else { |
| 26 | unregister_joystick_button(keycode - JS_BUTTON0); | 26 | unregister_joystick_button(keycode - QK_JOYSTICK_BUTTON_MIN); |
| 27 | } | 27 | } |
| 28 | return false; | 28 | return false; |
| 29 | } | 29 | } |
