summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2024-01-16 16:27:24 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2024-01-30 14:29:25 +1000
commit7cffd28e8f2de17ffe5f0bfbd9e85fc5cbc05fe0 (patch)
treeb1c9e76697d7899f4096c574cd7efde43de0b641
parent0322403ea455f55ad2907381b52803ee4ee47839 (diff)
tablet: don't use absinfo_range for the percentage calculation
Our percents are inclusive 0% and 100%.
-rw-r--r--src/evdev-tablet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 541485f1..1a4f5df8 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -1073,7 +1073,7 @@ tool_set_bits(const struct tablet_dispatch *tablet,
static inline int
axis_range_percentage(const struct input_absinfo *a, double percent)
{
- return absinfo_range(a) * percent/100.0 + a->minimum;
+ return (a->maximum - a->minimum) * percent/100.0 + a->minimum;
}
static inline void