mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-27 02:10:07 +01:00
Revert "tablet: fix the pressure offset range being off by one"
Fixing the range is only required when the output range is not inclusive
of the min/max (such as when mapping an abs axis to a screen width).
Our pressure range is inclusive 0.0 and 1.0, so we want absinfo->maximum
to map to exactly 1.0
This reverts commit a5b6f4009b.
This commit is contained in:
parent
8bb53150a9
commit
f20eefbc59
1 changed files with 1 additions and 1 deletions
|
|
@ -364,7 +364,7 @@ normalize_pressure(const struct input_absinfo *absinfo,
|
|||
* threshold is 0 pressure.
|
||||
*/
|
||||
int base = tool->pressure.threshold.lower;
|
||||
double range = absinfo->maximum - base + 1;
|
||||
double range = absinfo->maximum - base;
|
||||
double value = (absinfo->value - base) / range;
|
||||
|
||||
return max(0.0, value);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue