aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/event.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-03-03 21:57:42 -0800
committerChris Robinson <[email protected]>2018-03-03 21:57:42 -0800
commit179e1c4dbc143c9df50676ce538f628690799cd3 (patch)
tree98299a4841c6bb09aef87a72697e4e1651a91974 /OpenAL32/event.c
parent945d74cbc9dfa41c325efc029f2a4069dfcf9317 (diff)
Don't check for space in the ringbuffer before trying to write
The write method already checks and returns how much it managed to fit in.
Diffstat (limited to 'OpenAL32/event.c')
-rw-r--r--OpenAL32/event.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/OpenAL32/event.c b/OpenAL32/event.c
index 1189e889..12636489 100644
--- a/OpenAL32/event.c
+++ b/OpenAL32/event.c
@@ -102,9 +102,8 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A
if(isrunning && !(enabledevts&~flags))
{
static const AsyncEvent kill_evt = { 0 };
- while(ll_ringbuffer_write_space(context->AsyncEvents) == 0)
+ while(ll_ringbuffer_write(context->AsyncEvents, (const char*)&kill_evt, 1) == 0)
althrd_yield();
- ll_ringbuffer_write(context->AsyncEvents, (const char*)&kill_evt, 1);
alsem_post(&context->EventSem);
althrd_join(context->EventThread, NULL);
}