diff options
author | Drashna Jaelre <drashna@live.com> | 2022-03-13 17:01:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 00:01:47 +0000 |
commit | 921b9dad6c37575215231b34a3492ffb38eaeec2 (patch) | |
tree | cc08338fad283e7d442e73870c24eacc3e956977 /quantum/pointing_device.c | |
parent | cc9a2aef0f533adb239a2e2b8a37f81fe6b5b951 (diff) | |
download | qmk_firmware-921b9dad6c37575215231b34a3492ffb38eaeec2.tar.gz qmk_firmware-921b9dad6c37575215231b34a3492ffb38eaeec2.zip |
[Core] Move `has_mouse_report_changed` function to `report.c` (#16543)
* Move 'has_mouse_report_changed' checkto report.c
* change mousekeys to use memcpy
* fix linting issues
Diffstat (limited to 'quantum/pointing_device.c')
-rw-r--r-- | quantum/pointing_device.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/quantum/pointing_device.c b/quantum/pointing_device.c index 47a0af45d2..a160647890 100644 --- a/quantum/pointing_device.c +++ b/quantum/pointing_device.c @@ -71,17 +71,6 @@ static report_mouse_t local_mouse_report = {}; extern const pointing_device_driver_t pointing_device_driver; /** - * @brief Compares 2 mouse reports for difference and returns result - * - * @param[in] new_report report_mouse_t - * @param[in] old_report report_mouse_t - * @return bool result - */ -__attribute__((weak)) bool has_mouse_report_changed(report_mouse_t new_report, report_mouse_t old_report) { - return memcmp(&new_report, &old_report, sizeof(new_report)); -} - -/** * @brief Keyboard level code pointing device initialisation * */ @@ -165,7 +154,7 @@ __attribute__((weak)) void pointing_device_send(void) { static report_mouse_t old_report = {}; // If you need to do other things, like debugging, this is the place to do it. - if (has_mouse_report_changed(local_mouse_report, old_report)) { + if (has_mouse_report_changed(&local_mouse_report, &old_report)) { 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 |