mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2026-04-03 12:40:38 +02:00
tools: fix kernel-announced width/height
Side-effect of 240ba34ebd was that "touchpad size as listed by the kernel"
was now dependent on the values we got. This one is a static one based on the
axis info.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d05736765c
commit
2a612997ab
1 changed files with 3 additions and 1 deletions
|
|
@ -190,8 +190,10 @@ print_udev_override_rule(struct libevdev *dev,
|
|||
yres = round((double)h/size->h);
|
||||
|
||||
if (x->resolution && y->resolution) {
|
||||
int width = x->maximum - x->minimum,
|
||||
height = y->maximum - y->minimum;
|
||||
printf("Touchpad size as listed by the kernel: %dx%dmm\n",
|
||||
w/x->resolution, h/y->resolution);
|
||||
width/x->resolution, height/y->resolution);
|
||||
} else {
|
||||
printf("Touchpad has no resolution, size unknown\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue