mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-01 11:40:08 +01:00
filter: don't normalize the speed again in the default mouse filter
The first thing this filter does is normalize the coordinates to 1000dpi, i.e. all other values are in normalized coordinates. By normalizing the speed again we get an invalid value, effectively stretching or compressing the acceleration curve. e.g. on a 5000dpi mouse the estimated speed was 1/5 of the real speed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
f87fffd193
commit
49707691c8
1 changed files with 1 additions and 4 deletions
|
|
@ -196,7 +196,7 @@ accelerator_set_speed(struct motion_filter *filter,
|
|||
double
|
||||
pointer_accel_profile_linear(struct motion_filter *filter,
|
||||
void *data,
|
||||
double speed_in, /* in device units (units/µs) */
|
||||
double speed_in, /* in normalized units */
|
||||
uint64_t time)
|
||||
{
|
||||
struct pointer_accelerator *accel_filter =
|
||||
|
|
@ -206,9 +206,6 @@ pointer_accel_profile_linear(struct motion_filter *filter,
|
|||
const double incline = accel_filter->incline;
|
||||
double factor; /* unitless */
|
||||
|
||||
/* Normalize to 1000dpi, because the rest below relies on that */
|
||||
speed_in = speed_in * DEFAULT_MOUSE_DPI/accel_filter->dpi;
|
||||
|
||||
/*
|
||||
Our acceleration function calculates a factor to accelerate input
|
||||
deltas with. The function is a double incline with a plateau,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue