mirror of
https://github.com/FunKey-Project/picodrive-irixxxx.git
synced 2026-03-20 10:52:40 +01:00
bugfix + some tweaks
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@737 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
@@ -317,6 +317,16 @@ static void in_evdev_set_blocking(void *drv_data, int y)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user