mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 17:10:05 +01:00
Xi: update axisVals with the right subpixel data.
Subpixel data in data_frac is stored as FP32.32, hence we need to get that down again before adding it to the current value. Reported-by: Thomas Jaeger Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
abb8108fb4
commit
9bd08c690f
1 changed files with 1 additions and 1 deletions
|
|
@ -805,7 +805,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
|
|||
{
|
||||
/* XXX: Relative/Absolute mode */
|
||||
v->axisVal[i] = event->valuators.data[i];
|
||||
v->axisVal[i] += event->valuators.data_frac[i];
|
||||
v->axisVal[i] += (event->valuators.data_frac[i] * 1.0f / (1 << 16) / (1 << 16));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue