Fix getValuatorEvents to compute number of valuators correctly.

This commit is contained in:
Sascha Hlusiak 2008-05-30 19:30:06 +02:00
parent ddcca23a81
commit 7982aaa7f0

View File

@ -347,7 +347,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator,
for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) { for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) {
xv->type = DeviceValuator; xv->type = DeviceValuator;
xv->first_valuator = i; xv->first_valuator = i;
xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); xv->num_valuators = ((final_valuator - i) > 6) ? 6 : (final_valuator - i);
xv->deviceid = pDev->id; xv->deviceid = pDev->id;
switch (final_valuator - i) { switch (final_valuator - i) {
case 6: case 6: