aboutsummaryrefslogtreecommitdiffhomepage
path: root/input
diff options
context:
space:
mode:
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;
}