[PATCH libXi] Fix typo when converting raw events from the wire.

Jeremy Huddleston jeremyhu at apple.com
Wed Oct 6 12:27:15 PDT 2010


><

Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Oct 6, 2010, at 02:04, Carlos Garnacho wrote:

> 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
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list