mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 00:00:14 +01:00
filter: use a tmp variable for the accel factor
No real effect, just makes the diff for debugging printfs smaller. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c902b37a8d
commit
68f94c6ba4
1 changed files with 4 additions and 1 deletions
|
|
@ -385,11 +385,14 @@ pointer_accel_profile_linear(struct motion_filter *filter,
|
|||
const double max_accel = accel_filter->accel; /* unitless factor */
|
||||
const double threshold = accel_filter->threshold; /* units/ms */
|
||||
const double incline = accel_filter->incline;
|
||||
double factor;
|
||||
|
||||
s1 = min(1, 0.3 + speed_in * 4);
|
||||
s2 = 1 + (speed_in - threshold) * incline;
|
||||
|
||||
return min(max_accel, s2 > 1 ? s2 : s1);
|
||||
factor = min(max_accel, s2 > 1 ? s2 : s1);
|
||||
|
||||
return factor;
|
||||
}
|
||||
|
||||
double
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue