aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-02-10 21:42:45 -0800
committerChris Robinson <[email protected]>2018-02-11 06:14:18 -0800
commitb11e31fbfd6744a6d938ebb4a0e85c173386322a (patch)
tree67f4ddad035d94dc02716c5929726f9225e4498c /OpenAL32
parent1e93122470445810a77ee549c5945ead44fd5676 (diff)
Clear stale 'post's on the event semphaphore
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/event.c5
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;