diff options
author | Chris Robinson <[email protected]> | 2018-02-10 21:42:45 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-02-11 06:14:18 -0800 |
commit | b11e31fbfd6744a6d938ebb4a0e85c173386322a (patch) | |
tree | 67f4ddad035d94dc02716c5929726f9225e4498c /OpenAL32 | |
parent | 1e93122470445810a77ee549c5945ead44fd5676 (diff) |
Clear stale 'post's on the event semphaphore
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/event.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |