return;
}
- ev = d->interface->touch_down_events;
- while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
+ for (ev = d->interface->touch_down_events;
+ ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1;
+ ev++) {
int value = litest_auto_assign_value(d,
ev,
slot,
y,
axes,
touching);
- if (value != LITEST_AUTO_ASSIGN)
- litest_event(d, ev->type, ev->code, value);
- ev++;
+ if (value == LITEST_AUTO_ASSIGN)
+ continue;
+
+ litest_event(d, ev->type, ev->code, value);
}
}
} else
ev = up;
- while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
+ for ( /* */;
+ ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1;
+ ev++) {
int value = litest_auto_assign_value(d,
ev,
slot,
NULL,
false);
litest_event(d, ev->type, ev->code, value);
- ev++;
}
}
return;
}
- ev = d->interface->touch_move_events;
- while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
+ for (ev = d->interface->touch_move_events;
+ ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1;
+ ev++) {
int value = litest_auto_assign_value(d,
ev,
slot,
y,
axes,
touching);
- if (value != LITEST_AUTO_ASSIGN)
- litest_event(d, ev->type, ev->code, value);
- ev++;
+ if (value == LITEST_AUTO_ASSIGN)
+ continue;
+
+ litest_event(d, ev->type, ev->code, value);
}
}