Hi,
On Thu, 2009-05-07 at 21:03 +0300, Ville Syrjälä wrote:
> > +{
> > + LinuxInputData *data = (LinuxInputData*) driver_data;
> > +
> > + if (data->touchpad) {
> > + /* for the touchpad, events are normalized to 0..511 */
> > + switch (axis) {
> > + case DIAI_X:
> > + case DIAI_Y:
> > + ret_info->flags |= DIAIF_ABS_MIN | DIAIF_ABS_MAX;
> > + ret_info->abs_min = 0;
> > + ret_info->abs_max = (1 << 9) - 1;
> > + break;
> > + default:
> > + break;
> > + }
>
> We don't report absolute events for touchpads so this bit is not really
> needed.
OK, I'll take care of removing these lines then.
> > + if (axis <= ABS_PRESSURE && axis < DIAI_LAST) {
> > + unsigned long absbit[NBITS(ABS_CNT)];
> > +
> > + /* check if we have an absolute axes */
> > + ioctl( data->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit
> > );
> > +
> > + if (test_bit (axis, absbit)) {
> > + struct input_absinfo absinfo;
> > +
> > + ioctl( data->fd, EVIOCGABS(axis), &absinfo );
> > +
> > + ret_info->flags |= DIAIF_ABS_MIN | DIAIF_ABS_MAX;
> > + ret_info->abs_min = absinfo.minimum;
> > + ret_info->abs_max = absinfo.maximum;
> > + }
> > + }
> > + }
I also wonder if the code should perhaps check that absinfo.minimum or
absinfo.maximum as filled in by the linux-input layer are actually != 0.
Sven
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev