mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-02 09:50:09 +01:00
evdev: fix inverted mouse normalization
Regression introduced in 9f8edc5fd8 where it
changed from delta / (dpi/default) to delta * dpi/default, causing the inverse
effect of what the dpi setting is supposed to achieve.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
591a41f9dd
commit
c6d81c84de
1 changed files with 2 additions and 2 deletions
|
|
@ -230,8 +230,8 @@ normalize_delta(struct evdev_device *device,
|
|||
const struct device_coords *delta,
|
||||
struct normalized_coords *normalized)
|
||||
{
|
||||
normalized->x = delta->x * (double)device->dpi / DEFAULT_MOUSE_DPI;
|
||||
normalized->y = delta->y * (double)device->dpi / DEFAULT_MOUSE_DPI;
|
||||
normalized->x = delta->x * DEFAULT_MOUSE_DPI / (double)device->dpi;
|
||||
normalized->y = delta->y * DEFAULT_MOUSE_DPI / (double)device->dpi;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue