X-Git-Url: https://iankelling.org/git/?p=evhz;a=blobdiff_plain;f=evhz.c;h=947ab819be91523433dc38226795fb81f31a24f8;hp=1588024ba06b69b4daf35de3805f33592da56139;hb=d48d0d6dc66a638b0086ee3c6c898a1ba35284f8;hpb=5f76843477f74318bdafd3bf226466d5116d92cd diff --git a/evhz.c b/evhz.c index 1588024..947ab81 100644 --- a/evhz.c +++ b/evhz.c @@ -57,7 +57,7 @@ int main(int argc, char *argv[]) { // 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); @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) { continue; } - if(event.type == EV_REL) { + if(event.type == EV_REL || event.type == EV_ABS) { double time; int hz;