evdev: limit unnecessary polls

The previous code was probably a typo.
This patch doesn't bring any measurable
performance improvements, but still
prevents the fd from being corrupted.

Signed-off-by: Dariusz Stojaczyk <darek.stojaczyk@gmail.com>
This commit is contained in:
Dariusz Stojaczyk
2017-12-03 12:14:11 +01:00
parent 2c706dfb0b
commit 0125a497f0

View File

@@ -418,7 +418,7 @@ static void evdev_drain(void) {
static int evdev_handle(int fd) {
for (int i=0;i<numDevices;i++) {
if (devices[i].fd = fd) {
if (devices[i].fd == fd) {
int rc;
struct input_event ev;
while ((rc = libevdev_next_event(devices[i].dev, LIBEVDEV_READ_FLAG_NORMAL, &ev)) >= 0) {