- if(select(FD_SETSIZE, &set, NULL, NULL, NULL) > 0) {
- int bytes;
- struct input_event event;
-
- for(i = 0; i < EVENTS; i++) {
- if(events[i].fd == -1 || !FD_ISSET(events[i].fd, &set)) {
- continue;
- }
+ if(select(FD_SETSIZE, &set, NULL, NULL, NULL) <= 0) {
+ continue;
+ }