mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 08:48:02 +02:00
tablet: don't use absinfo_range for the percentage calculation
Our percents are inclusive 0% and 100%.
This commit is contained in:
parent
0322403ea4
commit
7cffd28e8f
1 changed files with 1 additions and 1 deletions
|
|
@ -1073,7 +1073,7 @@ tool_set_bits(const struct tablet_dispatch *tablet,
|
||||||
static inline int
|
static inline int
|
||||||
axis_range_percentage(const struct input_absinfo *a, double percent)
|
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
|
static inline void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue