mirror of https://github.com/mpv-player/mpv
Do not call usec_sleep when we are not supposed to sleep.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21468 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a01e63115a
commit
5bf0f17ac7
|
@ -945,6 +945,7 @@ mp_input_read_key_code(int time) {
|
||||||
|
|
||||||
if(num_key_fd == 0)
|
if(num_key_fd == 0)
|
||||||
{
|
{
|
||||||
|
if (time)
|
||||||
usec_sleep(time * 1000);
|
usec_sleep(time * 1000);
|
||||||
return MP_INPUT_NOTHING;
|
return MP_INPUT_NOTHING;
|
||||||
}
|
}
|
||||||
|
@ -1026,7 +1027,7 @@ if(n>0){
|
||||||
key_fds[i].flags |= MP_FD_DEAD;
|
key_fds[i].flags |= MP_FD_DEAD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!did_sleep)
|
if (time && !did_sleep)
|
||||||
usec_sleep(time * 1000);
|
usec_sleep(time * 1000);
|
||||||
return MP_INPUT_NOTHING;
|
return MP_INPUT_NOTHING;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue