mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 19:20:06 +01:00
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:
parent
0a5f884c58
commit
240ba34ebd
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue