qmk_firmware/tmk_core/protocol
Stefan Kerkmann b2d068d1aa
Fix mouse-key spamming empty reports (#21663)
Problem:

`mousekey_task` spams empty hid reports with when a mouse key is
pressed, causing resource exhaustion in the USB mouse endpoint.

Cause:

The check whether or not to send a new mouse report would always
evaluate to true if a mouse key is pressed:

1. `mouse_report` has non-zero fields and `tmpmr` is a copy of this
   fields.
2. `mouse_report` is set to zero, `tmpmr` has now non-zero fields.
3. `has_mouse_report_changed` compares the two and evaluates to true
4. a mouse report is sent.

Fix:

The check condition of `has_mouse_report_changed` will evaluate any
empty record as unchanged, as mouse report data is relative and doesn't
need to return to zero. An empty report will still be send by
`register_mouse` on release of all mouse buttons.
2023-08-02 13:47:25 +02:00
..
arm_atsam quantum: remove direct `quantum.h` includes (#21507) 2023-07-16 23:42:56 +10:00
chibios [Bug] Fix non-functional S3 wakeup / resume from suspense (#19780) 2023-06-26 23:55:52 +02:00
lufa
usb_hid
vusb Update keyboard report descriptor for USB compliance (#21626) 2023-07-28 01:05:01 +01:00
host.c
host.h
host_driver.h
report.c Fix mouse-key spamming empty reports (#21663) 2023-08-02 13:47:25 +02:00
report.h
usb_descriptor.c Update keyboard report descriptor for USB compliance (#21626) 2023-07-28 01:05:01 +01:00
usb_descriptor.h
usb_descriptor_common.h
usb_device_state.c
usb_device_state.h
usb_util.c
usb_util.h