From 46d1c0f39db7b414eb19cbff8c0ef83c51b0c163 Mon Sep 17 00:00:00 2001 From: Drzony Date: Mon, 15 Aug 2022 14:03:46 +0200 Subject: [PATCH 1/2] Fix mouse report comparison failing on shared EP --- quantum/pointing_device/pointing_device.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c index 505a7a6ffd52..7219558f4868 100644 --- a/quantum/pointing_device/pointing_device.c +++ b/quantum/pointing_device/pointing_device.c @@ -166,11 +166,13 @@ __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; +#if defined(SPLIT_POINTING_ENABLE) + memset(&shared_mouse_report, 0, sizeof(shared_mouse_report)); + shared_mouse_report.buttons = buttons; +#endif memcpy(&old_report, &local_mouse_report, sizeof(local_mouse_report)); } From b5b8272ff8822b0d3b54a4dcd1250a6dd7dbd345 Mon Sep 17 00:00:00 2001 From: Drzony Date: Sun, 28 Aug 2022 21:11:27 +0200 Subject: [PATCH 2/2] Update quantum/pointing_device/pointing_device.c Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> --- quantum/pointing_device/pointing_device.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c index 7219558f4868..ae3f122e89f8 100644 --- a/quantum/pointing_device/pointing_device.c +++ b/quantum/pointing_device/pointing_device.c @@ -169,10 +169,6 @@ __attribute__((weak)) void pointing_device_send(void) { uint8_t buttons = local_mouse_report.buttons; memset(&local_mouse_report, 0, sizeof(local_mouse_report)); local_mouse_report.buttons = buttons; -#if defined(SPLIT_POINTING_ENABLE) - memset(&shared_mouse_report, 0, sizeof(shared_mouse_report)); - shared_mouse_report.buttons = buttons; -#endif memcpy(&old_report, &local_mouse_report, sizeof(local_mouse_report)); }