summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-20 02:32:39 +0200
committerwm4 <wm4@nowhere>2014-05-20 02:40:28 +0200
commit15c22fb0eb1e29a5dfc04b07dda958d6c415d5c1 (patch)
treea1904b66294d10e6a638052aa1360a1adf8f5807 /input/input.c
parent7dc74bab3218462b6a361c966661fb08586272ad (diff)
downloadmpv-15c22fb0eb1e29a5dfc04b07dda958d6c415d5c1.tar.bz2
mpv-15c22fb0eb1e29a5dfc04b07dda958d6c415d5c1.tar.xz
input: fix compilation on windows
Currently I don't have a crosscompilation toolchain, so I couldn't test whether this actually compiles (and still can't).
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/input/input.c b/input/input.c
index ed9a15c017..b6dc43c79d 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1008,10 +1008,8 @@ static void input_wait_read(struct input_ctx *ictx, int time)
static void input_wait_read(struct input_ctx *ictx, int time)
{
- if (time > 0) {
- struct timespec deadline = mpthread_get_deadline(time / 1000.0);
- pthread_cond_timedwait(&ictx->wakeup, &ictx->mutex, &deadline);
- }
+ if (time > 0)
+ mpthread_cond_timedwait_rel(&ictx->wakeup, &ictx->mutex, time / 1000.0);
for (int i = 0; i < ictx->num_fds; i++)
read_fd(ictx, &ictx->fds[i]);