projects
/
platform
/
upstream
/
libevdev.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a5f884
)
tools: fix the touchpad resolution calculation
author
Peter Hutterer
<peter.hutterer@who-t.net>
Thu, 25 Aug 2016 21:54:01 +0000
(07:54 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Fri, 26 Aug 2016 01:43:54 +0000
(11:43 +1000)
Previous ones used the absinfo from the kernel but since we never updated that
from within the tool, the output was always the same.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/touchpad-edge-detector.c
patch
|
blob
|
history
diff --git
a/tools/touchpad-edge-detector.c
b/tools/touchpad-edge-detector.c
index e09f028269799f07bbab31c0fe67e7b7e379137b..ca34414d728d36ca1e42776642ff975fa8fcdb80 100644
(file)
--- a/
tools/touchpad-edge-detector.c
+++ b/
tools/touchpad-edge-detector.c
@@
-184,8
+184,8
@@
print_udev_override_rule(struct libevdev *dev,
x = libevdev_get_abs_info(dev, ABS_X);
y = libevdev_get_abs_info(dev, ABS_Y);
- w =
x->maximum - x->minimum
;
- h =
y->maximum - y->minimum
;
+ w =
dim->right - dim->left
;
+ h =
dim->bottom - dim->top
;
xres = round((double)w/size->w);
yres = round((double)h/size->h);