tools: fix the touchpad resolution calculation

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>
This commit is contained in:
Peter Hutterer 2016-08-26 07:54:01 +10:00
parent 0a5f884c58
commit 240ba34ebd

View file

@ -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);