Skip to content

Commit

Permalink
Fix Mouse Shared EP functionality (qmk#14136)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
drashna authored and nhongooi committed Dec 5, 2021
1 parent 6f72bb5 commit 3ba873c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ endif

ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
OPT_DEFS += -DMOUSEKEY_ENABLE
OPT_DEFS += -DMOUSE_ENABLE
MOUSE_ENABLE := yes
SRC += $(QUANTUM_DIR)/mousekey.c
endif

ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
OPT_DEFS += -DMOUSE_ENABLE
MOUSE_ENABLE := yes
SRC += $(QUANTUM_DIR)/pointing_device.c
endif

Expand Down
3 changes: 2 additions & 1 deletion tmk_core/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes)
MOUSE_SHARED_EP = yes
endif

ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
ifeq ($(strip $(MOUSE_ENABLE)), yes)
OPT_DEFS += -DMOUSE_ENABLE
ifeq ($(strip $(MOUSE_SHARED_EP)), yes)
TMK_COMMON_DEFS += -DMOUSE_SHARED_EP
SHARED_EP_ENABLE = yes
Expand Down

0 comments on commit 3ba873c

Please sign in to comment.