diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-12-03 14:01:22 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-12-03 14:01:22 +0000 |
commit | 5bf0f17ac737b84a6ae4ade20b08a54aa1717f22 (patch) | |
tree | 6d23a8f4386b2121d146711dac60039f6980210d /input | |
parent | a01e63115ac39897ef7b11fbf723475603b4a7e5 (diff) | |
download | mpv-5bf0f17ac737b84a6ae4ade20b08a54aa1717f22.tar.bz2 mpv-5bf0f17ac737b84a6ae4ade20b08a54aa1717f22.tar.xz |
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
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/input/input.c b/input/input.c index 9f95d723f4..35f13c1ecd 100644 --- a/input/input.c +++ b/input/input.c @@ -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; } |