Skip to content

Commit 3ba873c

Browse files
drashnanhongooi
authored andcommitted
Fix Mouse Shared EP functionality (qmk#14136)
Specifically, if you enable the shared endpoint for mouse reports (or keyboard, which force enables it for mouse), and you don't have mousekeys enabled, it does not properly enable shared mouse EP for pointing device (which uses mouse reports). This cause it to error out in compiling. This fixes up some of the logic to ensure that all use cases are supported, and consolidates some of the code.
1 parent 6f72bb5 commit 3ba873c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

common_features.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ endif
117117

118118
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
119119
OPT_DEFS += -DMOUSEKEY_ENABLE
120-
OPT_DEFS += -DMOUSE_ENABLE
120+
MOUSE_ENABLE := yes
121121
SRC += $(QUANTUM_DIR)/mousekey.c
122122
endif
123123

124124
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
125125
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
126-
OPT_DEFS += -DMOUSE_ENABLE
126+
MOUSE_ENABLE := yes
127127
SRC += $(QUANTUM_DIR)/pointing_device.c
128128
endif
129129

tmk_core/common.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes)
2525
MOUSE_SHARED_EP = yes
2626
endif
2727

28-
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
28+
ifeq ($(strip $(MOUSE_ENABLE)), yes)
29+
OPT_DEFS += -DMOUSE_ENABLE
2930
ifeq ($(strip $(MOUSE_SHARED_EP)), yes)
3031
TMK_COMMON_DEFS += -DMOUSE_SHARED_EP
3132
SHARED_EP_ENABLE = yes

0 commit comments

Comments
 (0)