From 1e95f7be8f214c544bf99f415916a4a5f07a1e9b Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 27 Nov 2022 03:14:45 +1100 Subject: Joystick feature improvements (#19052) --- tmk_core/protocol/host.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tmk_core/protocol/host.c') diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c index 5fee872326..2c6654e9a6 100644 --- a/tmk_core/protocol/host.c +++ b/tmk_core/protocol/host.c @@ -164,24 +164,27 @@ void host_joystick_send(joystick_t *joystick) { if (!driver) return; report_joystick_t report = { -# if JOYSTICK_AXES_COUNT > 0 +# ifdef JOYSTICK_SHARED_EP + .report_id = REPORT_ID_JOYSTICK, +# endif +# if JOYSTICK_AXIS_COUNT > 0 .axes = { joystick->axes[0], -# if JOYSTICK_AXES_COUNT >= 2 +# if JOYSTICK_AXIS_COUNT >= 2 joystick->axes[1], # endif -# if JOYSTICK_AXES_COUNT >= 3 +# if JOYSTICK_AXIS_COUNT >= 3 joystick->axes[2], # endif -# if JOYSTICK_AXES_COUNT >= 4 +# if JOYSTICK_AXIS_COUNT >= 4 joystick->axes[3], # endif -# if JOYSTICK_AXES_COUNT >= 5 +# if JOYSTICK_AXIS_COUNT >= 5 joystick->axes[4], # endif -# if JOYSTICK_AXES_COUNT >= 6 +# if JOYSTICK_AXIS_COUNT >= 6 joystick->axes[5], # endif }, -- cgit v1.2.3