mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 06:42:03 +00:00
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
This commit is contained in:
parent
55f6ab49eb
commit
189e0d00a6
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user