summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/touchpad-edge-detector.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/touchpad-edge-detector.c b/tools/touchpad-edge-detector.c
index ca34414..cc81ec1 100644
--- a/tools/touchpad-edge-detector.c
+++ b/tools/touchpad-edge-detector.c
@@ -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");
}