From 04f761afc7e7297a4cbc2a23f118fca4c5c25f5d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 7 Jan 2019 10:02:05 +0100 Subject: proto/mouse: use only one lookup table --- proto-mouse/ftnoir_protocol_mouse.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'proto-mouse/ftnoir_protocol_mouse.cpp') diff --git a/proto-mouse/ftnoir_protocol_mouse.cpp b/proto-mouse/ftnoir_protocol_mouse.cpp index 3afee411..9d582bce 100644 --- a/proto-mouse/ftnoir_protocol_mouse.cpp +++ b/proto-mouse/ftnoir_protocol_mouse.cpp @@ -77,10 +77,9 @@ int mouse::get_delta(int val, int prev) int mouse::get_value(double val, double sensitivity, bool is_rotation) { - constexpr double sgn[] = { 1e-2, 1 }; - constexpr double c = 1e-1; + constexpr double c[] = { 1e-3, 1e-1 }; - return iround(val * c * sensitivity * sgn[unsigned(is_rotation)]); + return iround(val * sensitivity * c[unsigned(is_rotation)]); } OPENTRACK_DECLARE_PROTOCOL(mouse, MOUSEControls, mouseDll) -- cgit v1.2.3