[PATCH libXi] Fix typo when converting raw events from the wire.
Carlos Garnacho
carlos at lanedo.com
Wed Oct 6 02:04:21 PDT 2010
From: Carlos Garnacho <carlosg at gnome.org>
The raw values were being miscalculated, containing only the integral part
of the FP3232, meanwhile normal valuators were mistakenly added the fractional
part of its corresponding raw value.
Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
---
src/XExtInt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/XExtInt.c b/src/XExtInt.c
index 4909ab6..05b4ff2 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1804,7 +1804,7 @@ wireToRawEvent(xXIRawEvent *in, XGenericEventCookie *cookie)
out->valuators.values[i] = values->integral;
out->valuators.values[i] += ((double)values->frac / (1 << 16) / (1 << 16));
out->raw_values[i] = (values + bits)->integral;
- out->valuators.values[i] += ((double)(values + bits)->frac / (1 << 16) / (1 << 16));
+ out->raw_values[i] += ((double)(values + bits)->frac / (1 << 16) / (1 << 16));
values++;
}
--
1.7.0.4
More information about the xorg-devel
mailing list