summaryrefslogtreecommitdiffstats
path: root/quantum/pointing_device/pointing_device.c
diff options
context:
space:
mode:
authorDrzony <drzony@gmail.com>2022-08-29 06:34:42 +0200
committerGitHub <noreply@github.com>2022-08-28 21:34:42 -0700
commitf2edb73974d15b88ea9614002b18b045551b71d8 (patch)
tree17a02c1e4568978a2ab7e482fa8f881319646631 /quantum/pointing_device/pointing_device.c
parent7e246b8a63d8661f345ebc08a6a9b8bd56aaf99e (diff)
Fix mouse report comparison failing on shared EP (#18060)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
Diffstat (limited to 'quantum/pointing_device/pointing_device.c')
-rw-r--r--quantum/pointing_device/pointing_device.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c
index 505a7a6ffd..ae3f122e89 100644
--- a/quantum/pointing_device/pointing_device.c
+++ b/quantum/pointing_device/pointing_device.c
@@ -166,11 +166,9 @@ __attribute__((weak)) void pointing_device_send(void) {
host_mouse_send(&local_mouse_report);
}
// send it and 0 it out except for buttons, so those stay until they are explicity over-ridden using update_pointing_device
- local_mouse_report.x = 0;
- local_mouse_report.y = 0;
- local_mouse_report.v = 0;
- local_mouse_report.h = 0;
-
+ uint8_t buttons = local_mouse_report.buttons;
+ memset(&local_mouse_report, 0, sizeof(local_mouse_report));
+ local_mouse_report.buttons = buttons;
memcpy(&old_report, &local_mouse_report, sizeof(local_mouse_report));
}