diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-01-07 10:02:05 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-01-16 07:48:21 +0100 |
commit | 04f761afc7e7297a4cbc2a23f118fca4c5c25f5d (patch) | |
tree | 4fb429665fb8566367aee83733f1bdc1df20a199 /proto-mouse/ftnoir_protocol_mouse.cpp | |
parent | 9f365bc81f9d7a3bb0b31261776580b178e02ce2 (diff) |
proto/mouse: use only one lookup table
Diffstat (limited to 'proto-mouse/ftnoir_protocol_mouse.cpp')
-rw-r--r-- | proto-mouse/ftnoir_protocol_mouse.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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) |