33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
|
From 64b5e52868db96be9b899ba98b02d061a838304e Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||
|
Date: Wed, 8 Apr 2015 15:52:58 +1000
|
||
|
Subject: [PATCH libinput] evdev: fix inverted mouse normalization
|
||
|
|
||
|
Regression introduced in 9f8edc5fd880e0a9c482b36e6b4120ccc056ee0b 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>
|
||
|
---
|
||
|
src/evdev.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/src/evdev.c b/src/evdev.c
|
||
|
index 00450bf..243cd22 100644
|
||
|
--- a/src/evdev.c
|
||
|
+++ b/src/evdev.c
|
||
|
@@ -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
|
||
|
--
|
||
|
2.3.4
|
||
|
|