From 63df228336ccea949f94ae31bfb46b91234c39a6 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 31 Jul 2021 07:35:46 -0400 Subject: [PATCH] toss WSAPoll() into the mix --- src/lib/input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/input.c b/src/lib/input.c index 69dc4cfde..b64a07334 100644 --- a/src/lib/input.c +++ b/src/lib/input.c @@ -409,8 +409,12 @@ block_on_input(int fd, const struct timespec* ts){ #ifdef __APPLE__ int timeoutms = ts ? ts->tv_sec * 1000 + ts->tv_nsec / 1000000 : -1; while((events = poll(&pfd, 1, timeoutms)) < 0){ // FIXME smask? +#else +#ifdef __MINGW64__ + while((events = WSAPoll(&pfd, 1, 0)) < 0){ #else while((events = ppoll(&pfd, 1, ts, &smask)) < 0){ +#endif #endif if(events == 0){ return 0;