mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-17 14:22:00 +00:00
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:
+1
-1
@@ -418,7 +418,7 @@ static void evdev_drain(void) {
|
|||||||
|
|
||||||
static int evdev_handle(int fd) {
|
static int evdev_handle(int fd) {
|
||||||
for (int i=0;i<numDevices;i++) {
|
for (int i=0;i<numDevices;i++) {
|
||||||
if (devices[i].fd = fd) {
|
if (devices[i].fd == fd) {
|
||||||
int rc;
|
int rc;
|
||||||
struct input_event ev;
|
struct input_event ev;
|
||||||
while ((rc = libevdev_next_event(devices[i].dev, LIBEVDEV_READ_FLAG_NORMAL, &ev)) >= 0) {
|
while ((rc = libevdev_next_event(devices[i].dev, LIBEVDEV_READ_FLAG_NORMAL, &ev)) >= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user