diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2010-10-06 11:04:21 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-07 09:27:04 +1000 |
commit | f237427f897d1dc527494653735d4bb93d740546 (patch) | |
tree | 38898d4824c4a123968e9388e126f676b47970f0 | |
parent | abc26c71b6032683b89085a7ebcd40ca81cdf3f2 (diff) |
Fix typo when converting raw events from the wire.
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@gnome.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/XExtInt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XExtInt.c b/src/XExtInt.c index bbd406d..eed6637 100644 --- a/src/XExtInt.c +++ b/src/XExtInt.c @@ -1638,7 +1638,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++; } |