notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finish migrating to new mem handling. Make carthw db external.
[picodrive.git]
/
platform
/
linux
/
in_evdev.c
diff --git
a/platform/linux/in_evdev.c
b/platform/linux/in_evdev.c
index
4e23677
..
7866015
100644
(file)
--- a/
platform/linux/in_evdev.c
+++ b/
platform/linux/in_evdev.c
@@
-317,6
+317,16
@@
static void in_evdev_set_blocking(void *drv_data, int y)
perror("in_evdev: F_GETFL fcntl failed");
return;
}
perror("in_evdev: F_GETFL fcntl failed");
return;
}
+
+ if (flags & O_NONBLOCK) {
+ /* flush the event queue */
+ struct input_event ev;
+ do {
+ ret = read(dev->fd, &ev, sizeof(ev));
+ }
+ while (ret == sizeof(ev));
+ }
+
if (y)
flags &= ~O_NONBLOCK;
else
if (y)
flags &= ~O_NONBLOCK;
else