On 06/09/2011 07:17 PM, Daniel Stone wrote:
> This widens almost all of the float-using code in ptrveloc.[ch] to
> doubles, other than values coming from properties which are specified to
> be floats by the property API.
>
> Bumps input API to v14 as this changes the AccelScheme signature, as
> used by xf86-input-synaptics.
>
> Signed-off-by: Daniel Stone <[email protected]>
> ---
> dix/ptrveloc.c | 214 +++++++++++++++++++--------------------
> hw/xfree86/common/xf86Module.h | 2 +-
> - float mult = 0.0, tmpf;
> - int dx = 0, dy = 0, tmpi;
> + double mult = 0.0, tmpf;
> + double dx = 0.0, dy = 0.0;
[...]
> if (dx) {
> - tmpf = mult * (float)dx +
> + tmpf = mult * (double)dx +
> dev->last.remainder[0];
> tmpi = (int) tmpf;
> valuator_mask_set(val, 0, tmpi);
> - dev->last.remainder[0] = tmpf - (float)tmpi;
> + dev->last.remainder[0] = tmpf - (double)tmpi;
> }
> if (dy) {
I think this really should be if (dx != 0.0). If only to be explicit.
(There are 4 instances of that.)
Otherwise,
Reviewed-by: Simon Thum <[email protected]>
Cheers,
Simon
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel