[PATCH libinput 13/23] filter: move the velocity diff to the only function we use it in
Peter Hutterer
peter.hutterer at who-t.net
Thu Apr 12 06:34:39 UTC 2018
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/filter.c b/src/filter.c
index fef2c835..ed90af70 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -101,7 +101,6 @@ filter_get_type(struct motion_filter *filter)
* Pointer acceleration filter constants
*/
-#define MAX_VELOCITY_DIFF v_ms2us(1) /* units/us */
#define MOTION_TIMEOUT ms2us(1000)
#define NUM_POINTER_TRACKERS 16
@@ -227,6 +226,7 @@ calculate_velocity_after_timeout(struct pointer_tracker *tracker,
double
calculate_velocity(struct pointer_trackers *trackers, uint64_t time)
{
+ const int MAX_VELOCITY_DIFF = v_ms2us(1); /* units/us */
struct pointer_tracker *tracker;
double velocity;
double result = 0.0;
--
2.14.3
More information about the wayland-devel
mailing list