From a1717debdfde05cec5e50693ac533a70434df1c8 Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 23 Jul 2002 22:04:36 +0000 Subject: [PATCH] [project @ 2002-07-23 22:04:36 by sof] inputReady(): using MsgWaitForMultipleObjects() instead of WaitForMultipleObjects() on file handles is nicer from within a message pump, but here it is less confusing to use the latter (and simply just block message delivery for its duration.) --- cbits/inputReady.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cbits/inputReady.c b/cbits/inputReady.c index 5b1e005..8677f26 100644 --- a/cbits/inputReady.c +++ b/cbits/inputReady.c @@ -50,11 +50,10 @@ inputReady(int fd, int msecs, int isSock) DWORD rc; HANDLE hFile = (HANDLE)_get_osfhandle(fd); - rc = MsgWaitForMultipleObjects( 1, - &hFile, - FALSE, /* wait all */ - msecs, /*millisecs*/ - QS_ALLEVENTS); + rc = WaitForMultipleObjects( 1, + &hFile, + TRUE, /* wait all */ + msecs); /*millisecs*/ /* 1 => Input ready, 0 => not ready, -1 => error */ switch (rc) { -- 1.7.10.4