From 5593573182d7b490f4c11576f898e34d6d0bde7a Mon Sep 17 00:00:00 2001 From: crs Date: Sun, 29 Feb 2004 21:34:30 +0000 Subject: [PATCH] Fixed processing of events. Was waking up on a sent (rather than posted) message but then blocking in GetMessage() which handles the sent message directly. No longer blocking on sent messages. --- lib/platform/CMSWindowsEventQueueBuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/platform/CMSWindowsEventQueueBuffer.cpp b/lib/platform/CMSWindowsEventQueueBuffer.cpp index 99366e1c..2f126095 100644 --- a/lib/platform/CMSWindowsEventQueueBuffer.cpp +++ b/lib/platform/CMSWindowsEventQueueBuffer.cpp @@ -56,7 +56,7 @@ CMSWindowsEventQueueBuffer::waitForEvent(double timeout) // MsgWaitForMultipleObjects() will block even if the queue isn't // empty if the messages in the queue were there before the last // call to GetMessage()/PeekMessage(). - if (HIWORD(GetQueueStatus(QS_ALLINPUT)) != 0) { + if (HIWORD(GetQueueStatus(QS_ALLEVENTS)) != 0) { return; } @@ -73,7 +73,7 @@ CMSWindowsEventQueueBuffer::waitForEvent(double timeout) // cancellation but that's okay because we're run in the main // thread and we never cancel that thread. HANDLE dummy[1]; - MsgWaitForMultipleObjects(0, dummy, FALSE, t, QS_ALLINPUT); + MsgWaitForMultipleObjects(0, dummy, FALSE, t, QS_ALLEVENTS); } IEventQueueBuffer::Type @@ -113,7 +113,7 @@ CMSWindowsEventQueueBuffer::addEvent(UInt32 dataID) bool CMSWindowsEventQueueBuffer::isEmpty() const { - return (HIWORD(GetQueueStatus(QS_ALLINPUT)) == 0); + return (HIWORD(GetQueueStatus(QS_ALLEVENTS)) == 0); } CEventQueueTimer*