On Thu, Oct 20, 2011 at 02:03:25PM +0100, Daniel Stone wrote:
> Hi,
> 
> On Thu, Oct 20, 2011 at 04:25:41PM +1000, Peter Hutterer wrote:
> > @@ -482,6 +483,41 @@ appendValuatorInfo(DeviceChangedEvent *dce, 
> > xXIValuatorInfo *info, int axisnumbe
> >  }
> >  
> >  static int
> > +appendScrollInfo(DeviceChangedEvent *dce, xXIScrollInfo *info, int 
> > axisnumber)
> > +{
> > +    if (dce->valuators[axisnumber].scroll.type == SCROLL_TYPE_NONE)
> > +        return 0;
> > +
> > +    info->type = XIScrollClass;
> > +    info->length = sizeof(xXIScrollInfo)/4;
> > +    info->number = axisnumber;
> > +    switch(dce->valuators[axisnumber].scroll.type)
>              ^
>              space
> 
> > +    {
> > +        case SCROLL_TYPE_VERTICAL:
> > +            info->scroll_type = XIScrollTypeVertical;
> > +            break;
> > +        case SCROLL_TYPE_HORIZONTAL:
> > +            info->scroll_type = XIScrollTypeHorizontal;
> > +            break;
> > +        default:
> > +            ErrorF("[Xi] Unknown scroll type %d. This is a bug.\n", 
> > dce->valuators[axisnumber].scroll.type);
> > +            break;
> > +    }
> > +    info->increment.integral = 
> > (int)dce->valuators[axisnumber].scroll.increment;
> > +    info->increment.frac = (unsigned 
> > int)dce->valuators[axisnumber].scroll.increment * (1UL << 16) * (1UL << 16);
> 
> This should be using double_to_fp3232, no?

yes, amended locally. this was obviously developed on a different branch that
didn't have the functions yet.

> Other than that:
> Reviewed-by: Daniel Stone <[email protected]>

thanks.

Cheers,
  Peter
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to