summaryrefslogtreecommitdiff
path: root/users/drashna/pointing/pointing.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-08-28 19:55:56 +0000
committerQMK Bot <hello@qmk.fm>2022-08-28 19:55:56 +0000
commit8fc62cb09844b635039f1a1b1349f445920ee118 (patch)
tree6fd9ceba189abc288a4cb8751815853a4672809e /users/drashna/pointing/pointing.c
parent8e113c5991503121ed504a2755a9dfa0433c1f3e (diff)
parentfa08cb2478e8c13a9f1c785956c95cb49bbebba3 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users/drashna/pointing/pointing.c')
-rw-r--r--users/drashna/pointing/pointing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/users/drashna/pointing/pointing.c b/users/drashna/pointing/pointing.c
index 551034ff45..c9a7945a84 100644
--- a/users/drashna/pointing/pointing.c
+++ b/users/drashna/pointing/pointing.c
@@ -22,7 +22,7 @@ __attribute__((weak)) report_mouse_t pointing_device_task_keymap(report_mouse_t
}
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
- int8_t x = mouse_report.x, y = mouse_report.y;
+ mouse_xy_report_t x = mouse_report.x, y = mouse_report.y;
mouse_report.x = 0;
mouse_report.y = 0;
@@ -33,8 +33,8 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
#endif
if (timer_elapsed(mouse_debounce_timer) > TAP_CHECK) {
if (enable_acceleration) {
- x = (x > 0 ? x * x / 16 + x : -x * x / 16 + x);
- y = (y > 0 ? y * y / 16 + y : -y * y / 16 + y);
+ x = (mouse_xy_report_t)(x > 0 ? x * x / 16 + x : -x * x / 16 + x);
+ y = (mouse_xy_report_t)(y > 0 ? y * y / 16 + y : -y * y / 16 + y);
}
mouse_report.x = x;
mouse_report.y = y;