summaryrefslogtreecommitdiffhomepage
path: root/proto-mouse
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-25 06:48:45 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-25 07:35:43 +0200
commit145b8cd856592322b13edcc7f7ac2690415425bc (patch)
tree13d760f42a4174484b725f5822254f42e8e62a20 /proto-mouse
parenta424e89c6598f21705ea0fba68aa20e6dc766e01 (diff)
proto/mouse: fix vertical movement wraparound
Diffstat (limited to 'proto-mouse')
-rw-r--r--proto-mouse/ftnoir_protocol_mouse.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/proto-mouse/ftnoir_protocol_mouse.cpp b/proto-mouse/ftnoir_protocol_mouse.cpp
index d57d8809..40e28c32 100644
--- a/proto-mouse/ftnoir_protocol_mouse.cpp
+++ b/proto-mouse/ftnoir_protocol_mouse.cpp
@@ -41,8 +41,7 @@ void mouse::pose(const double* headpose)
*s.sensitivity_y,
axis_y >= 3);
- const int dx = get_delta(mouse_x, last_x),
- dy = get_delta(mouse_y, last_y);
+ int dx = get_delta(mouse_x, last_x), dy = mouse_y - last_y;
last_x = mouse_x; last_y = mouse_y;