mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-27 19:41:16 +00:00
Update tmk_core/protocol/chibios/usb_main.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
This commit is contained in:
parent
887e96cbb2
commit
c447c4ffd5
@ -891,45 +891,37 @@ void virtser_task(void) {
|
|||||||
void send_joystick_packet(joystick_t *joystick) {
|
void send_joystick_packet(joystick_t *joystick) {
|
||||||
joystick_report_t rep = {
|
joystick_report_t rep = {
|
||||||
# if JOYSTICK_AXES_COUNT > 0
|
# if JOYSTICK_AXES_COUNT > 0
|
||||||
.axes = {joystick->axes[0]
|
.axes = {joystick->axes[0],
|
||||||
|
|
||||||
# if JOYSTICK_AXES_COUNT >= 2
|
# if JOYSTICK_AXES_COUNT >= 2
|
||||||
,
|
joystick->axes[1],
|
||||||
joystick->axes[1]
|
|
||||||
# endif
|
# endif
|
||||||
# if JOYSTICK_AXES_COUNT >= 3
|
# if JOYSTICK_AXES_COUNT >= 3
|
||||||
,
|
joystick->axes[2],
|
||||||
joystick->axes[2]
|
|
||||||
# endif
|
# endif
|
||||||
# if JOYSTICK_AXES_COUNT >= 4
|
# if JOYSTICK_AXES_COUNT >= 4
|
||||||
,
|
joystick->axes[3],
|
||||||
joystick->axes[3]
|
|
||||||
# endif
|
# endif
|
||||||
# if JOYSTICK_AXES_COUNT >= 5
|
# if JOYSTICK_AXES_COUNT >= 5
|
||||||
,
|
joystick->axes[4],
|
||||||
joystick->axes[4]
|
|
||||||
# endif
|
# endif
|
||||||
# if JOYSTICK_AXES_COUNT >= 6
|
# if JOYSTICK_AXES_COUNT >= 6
|
||||||
,
|
joystick->axes[5],
|
||||||
joystick->axes[5]
|
|
||||||
# endif
|
# endif
|
||||||
},
|
},
|
||||||
# endif // JOYSTICK_AXES_COUNT>0
|
# endif // JOYSTICK_AXES_COUNT>0
|
||||||
|
|
||||||
# if JOYSTICK_BUTTON_COUNT > 0
|
# if JOYSTICK_BUTTON_COUNT > 0
|
||||||
.buttons = {joystick->buttons[0]
|
.buttons = {joystick->buttons[0],
|
||||||
|
|
||||||
# if JOYSTICK_BUTTON_COUNT > 8
|
# if JOYSTICK_BUTTON_COUNT > 8
|
||||||
,
|
joystick->buttons[1],
|
||||||
joystick->buttons[1]
|
|
||||||
# endif
|
# endif
|
||||||
# if JOYSTICK_BUTTON_COUNT > 16
|
# if JOYSTICK_BUTTON_COUNT > 16
|
||||||
,
|
joystick->buttons[2],
|
||||||
joystick->buttons[2]
|
|
||||||
# endif
|
# endif
|
||||||
# if JOYSTICK_BUTTON_COUNT > 24
|
# if JOYSTICK_BUTTON_COUNT > 24
|
||||||
,
|
joystick->buttons[3],
|
||||||
joystick->buttons[3]
|
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
# endif // JOYSTICK_BUTTON_COUNT>0
|
# endif // JOYSTICK_BUTTON_COUNT>0
|
||||||
|
Loading…
Reference in New Issue
Block a user