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:
reimar 2006-12-03 14:01:22 +00:00
parent a01e63115a
commit 5bf0f17ac7
1 changed files with 3 additions and 2 deletions

View File

@ -945,7 +945,8 @@ mp_input_read_key_code(int time) {
if(num_key_fd == 0)
{
usec_sleep(time * 1000);
if (time)
usec_sleep(time * 1000);
return MP_INPUT_NOTHING;
}
@ -1026,7 +1027,7 @@ if(n>0){
key_fds[i].flags |= MP_FD_DEAD;
}
}
if (!did_sleep)
if (time && !did_sleep)
usec_sleep(time * 1000);
return MP_INPUT_NOTHING;
}