summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/host.c
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-11-27 03:14:45 +1100
committerGitHub <noreply@github.com>2022-11-27 03:14:45 +1100
commit1e95f7be8f214c544bf99f415916a4a5f07a1e9b (patch)
tree99e7148ab4c464f40da8f0ee01e079843a26cf14 /tmk_core/protocol/host.c
parenta5a20cc792540c0de61f064bd8dafcdc5815d4cc (diff)
Joystick feature improvements (#19052)
Diffstat (limited to 'tmk_core/protocol/host.c')
-rw-r--r--tmk_core/protocol/host.c15
1 files changed, 9 insertions, 6 deletions
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
},