filter: reduce deceleration to minimal speeds only

Deceleration at low speeds is intended to enhance precision when moving the
pointer slowly. However, the adaptive deceleration we used was badly
calibrated, at slow-but-normal speeds the pointer became too slow to manouver.

We don't want to drop deceleration completely, the subpixel precision it
provides is useful. And it also helps those that can't move a 1000dpi mouse by
exactly one unit.

Make the adaptive deceleration steeper so it only kicks in at extremely slow
motions and defaults to 1 at anything resembling normal movement (i.e. pointer
moves like the physical device does).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2015-06-12 15:31:56 +10:00
parent b344e3e566
commit 6ea69c2b3d

View file

@ -387,7 +387,7 @@ pointer_accel_profile_linear(struct motion_filter *filter,
const double incline = accel_filter->incline;
double factor;
s1 = min(1, 0.3 + speed_in * 4);
s1 = min(1, 0.3 + speed_in * 10);
s2 = 1 + (speed_in - threshold) * incline;
factor = min(max_accel, s2 > 1 ? s2 : s1);