From b11e31fbfd6744a6d938ebb4a0e85c173386322a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 10 Feb 2018 21:42:45 -0800 Subject: Clear stale 'post's on the event semphaphore --- OpenAL32/event.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenAL32') diff --git a/OpenAL32/event.c b/OpenAL32/event.c index f65efc7c..ef36f977 100644 --- a/OpenAL32/event.c +++ b/OpenAL32/event.c @@ -13,6 +13,11 @@ static int EventThread(void *arg) { ALCcontext *context = arg; + /* Clear all pending posts on the semaphore. */ + while(alsem_trywait(&context->EventSem) == althrd_success) + { + } + while(1) { AsyncEvent evt; -- cgit v1.2.3