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:
1 parent
0a5f884c58
commit
240ba34ebd
1 file changed
+2
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user