diff options
author | Drashna Jaelre <drashna@live.com> | 2022-06-08 18:39:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-08 18:39:16 -0700 |
commit | 0ab51ee29d6e980a50b27f122a10d0f7de4b1aed (patch) | |
tree | 8e4d62aa24feccfd8f9c51bf64b1fc7391ff0534 /tmk_core/protocol/host.c | |
parent | 84944df6a635da6502117e5b245113296babb39e (diff) |
Add support for large Mouse Reports (#16371)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'tmk_core/protocol/host.c')
-rw-r--r-- | tmk_core/protocol/host.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c index 053d2b79e3..3d8604d541 100644 --- a/tmk_core/protocol/host.c +++ b/tmk_core/protocol/host.c @@ -94,6 +94,11 @@ void host_mouse_send(report_mouse_t *report) { #ifdef MOUSE_SHARED_EP report->report_id = REPORT_ID_MOUSE; #endif +#ifdef MOUSE_EXTENDED_REPORT + // clip and copy to Boot protocol XY + report->boot_x = (report->x > 127) ? 127 : ((report->x < -127) ? -127 : report->x); + report->boot_y = (report->y > 127) ? 127 : ((report->y < -127) ? -127 : report->y); +#endif (*driver->send_mouse)(report); } |