diff options
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c index d32427c..9e3cc4e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1006,10 +1006,9 @@ EvdevReadInput(InputInfoPtr pInfo) len = mtdev_get(pEvdev->mtdev, pInfo->fd, ev, NUM_EVENTS) * sizeof(struct input_event); else - len = read(pInfo->fd, &ev, sizeof(ev)); -#else - len = read(pInfo->fd, &ev, sizeof(ev)); #endif + len = read(pInfo->fd, &ev, sizeof(ev)); + if (len <= 0) { if (errno == ENODEV) /* May happen after resume */ |