Skip to content

Commit

Permalink
Fix mouse report comparison failing on shared EP (qmk#18060)
Browse files Browse the repository at this point in the history
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
  • Loading branch information
2 people authored and ramonimbao committed Nov 28, 2022
1 parent 5a9af8e commit 6a116b5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions quantum/pointing_device/pointing_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 6a116b5

Please sign in to comment.