[PATCH] Fix FP1616 macro

Peter Hutterer peter.hutterer at who-t.net
Wed Oct 31 16:39:06 PDT 2012


On Wed, Oct 31, 2012 at 12:26:15PM +0100, Daniel Martin wrote:
> Do not add the fractional part to the integral.
> 
> Signed-off-by: Daniel Martin <consume.noise at gmail.com>
> ---
>  include/eventconvert.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/eventconvert.h b/include/eventconvert.h
> index 4c56d53..cf86eb3 100644
> --- a/include/eventconvert.h
> +++ b/include/eventconvert.h
> @@ -29,7 +29,7 @@
>  #include "events.h"
>  #include "eventstr.h"
>  
> -#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
> +#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac))
>  
>  _X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
>  _X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
> -- 
> 1.8.0
> 

whoah. good catch, thanks. applied in my tree

Cheers,
   Peter



More information about the xorg-devel mailing list