diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-03-16 14:28:31 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-03-16 06:03:56 +0000 |
commit | 1d0dbd2461e49c903cdf03c6841c34450cf70dbf (patch) | |
tree | 95a89b33cbae195c1e648cb0c68b23d19484330e | |
parent | cbff56e6a2eadceeb116842930adfbd40f15ba9b (diff) | |
download | libinput-1d0dbd2461e49c903cdf03c6841c34450cf70dbf.tar.gz |
filter: correct comments about the threshold's unit
See d6e531349745ff38ae457169d5089ea61297accf for confirmation that the
threshold is intended to be in mm/s, the comment here is simply a leftover from
earlier times when the acceleration method was using device-units only.
Fixes #585
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/filter-mouse.c | 8 | ||||
-rw-r--r-- | src/filter-touchpad.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/filter-mouse.c b/src/filter-mouse.c index 8d0a205e..0c2f1fef 100644 --- a/src/filter-mouse.c +++ b/src/filter-mouse.c @@ -38,8 +38,8 @@ * Default parameters for pointer acceleration profiles. */ -#define DEFAULT_THRESHOLD v_ms2us(0.4) /* in units/us */ -#define MINIMUM_THRESHOLD v_ms2us(0.2) /* in units/us */ +#define DEFAULT_THRESHOLD v_ms2us(0.4) /* in 1000dpi units/us */ +#define MINIMUM_THRESHOLD v_ms2us(0.2) /* in 1000dpi units/us */ #define DEFAULT_ACCELERATION 2.0 /* unitless factor */ #define DEFAULT_INCLINE 1.1 /* unitless factor */ @@ -53,7 +53,7 @@ struct pointer_accelerator { struct pointer_trackers trackers; - double threshold; /* units/us */ + double threshold; /* 1000dpi units/us */ double accel; /* unitless factor */ double incline; /* incline of the function */ @@ -231,7 +231,7 @@ pointer_accel_profile_linear(struct motion_filter *filter, struct pointer_accelerator *accel_filter = (struct pointer_accelerator *)filter; const double max_accel = accel_filter->accel; /* unitless factor */ - const double threshold = accel_filter->threshold; /* units/us */ + const double threshold = accel_filter->threshold; /* 1000dpi units/us */ const double incline = accel_filter->incline; double factor; /* unitless */ diff --git a/src/filter-touchpad.c b/src/filter-touchpad.c index 0a9fdc2d..0d1021a7 100644 --- a/src/filter-touchpad.c +++ b/src/filter-touchpad.c @@ -50,7 +50,7 @@ struct touchpad_accelerator { struct pointer_trackers trackers; - double threshold; /* units/us */ + double threshold; /* mm/s */ double accel; /* unitless factor */ int dpi; @@ -233,7 +233,7 @@ touchpad_accel_profile_linear(struct motion_filter *filter, { struct touchpad_accelerator *accel_filter = (struct touchpad_accelerator *)filter; - const double threshold = accel_filter->threshold; /* units/us */ + const double threshold = accel_filter->threshold; /* mm/s */ const double baseline = 0.9; double factor; /* unitless */ |