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:
1 parent
d05736765c
commit
2a612997ab
1 file changed
+3
-1
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user