summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-27 08:16:23 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-27 08:16:23 +0000
commit189e0d00a625fc3dc03adcbb196a1604074a329f (patch)
treeed286acbcd98b2034743d5b81160de930c2daf5f /input
parent55f6ab49eb4fded988e2d893c7e7811768d182e7 (diff)
downloadmpv-189e0d00a625fc3dc03adcbb196a1604074a329f.tar.bz2
mpv-189e0d00a625fc3dc03adcbb196a1604074a329f.tar.xz
consume empty lirc events at once.
Patch by Lev A. Melnikovsky {leva at kapitza ras ru}. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15826 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input')
-rw-r--r--input/input.c2
-rw-r--r--input/input.h2
-rw-r--r--input/lirc.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c
index 04b7bff576..7589a3bc5c 100644
--- a/input/input.c
+++ b/input/input.c
@@ -708,6 +708,8 @@ mp_input_read_cmd(mp_input_fd_t* mp_fd, char** ret) {
mp_msg(MSGT_INPUT,MSGL_ERR,"Error while reading cmd fd %d: %s\n",mp_fd->fd,strerror(errno));
case MP_INPUT_NOTHING:
return r;
+ case MP_INPUT_RETRY:
+ continue;
}
// EOF ?
} else if(r == 0) {
diff --git a/input/input.h b/input/input.h
index 43ea58d69e..a4751e788b 100644
--- a/input/input.h
+++ b/input/input.h
@@ -115,6 +115,8 @@
#define MP_INPUT_DEAD -2
// No input was available
#define MP_INPUT_NOTHING -3
+//! Input will be available if you try again
+#define MP_INPUT_RETRY -4
// For the key's drivers, if possible you can send key up and key down
// events. Key up is the default, to send a key down you must use the
diff --git a/input/lirc.c b/input/lirc.c
index 03730e25aa..88dd27dcf6 100644
--- a/input/lirc.c
+++ b/input/lirc.c
@@ -102,7 +102,7 @@ int mp_input_lirc_read(int fd,char* dest, int s) {
else if(cmd_buf) // return the first command in the buffer
return mp_input_lirc_read(fd,dest,s);
else
- return MP_INPUT_NOTHING;
+ return MP_INPUT_RETRY;
}