// List input devices
for(i = 0; i < EVENTS; i++) {
- char device[18];
+ char device[19];
sprintf(device, "/dev/input/event%i", i);
events[i].fd = open(device, O_RDONLY);
continue;
}
- if(event.type == EV_REL) {
+ if(event.type == EV_REL || event.type == EV_ABS) {
double time;
int hz;