diff options
author | Chris Robinson <[email protected]> | 2018-01-24 17:07:01 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-24 17:07:01 -0800 |
commit | 2ded5547ba431a0859bc08276ab720aea9ca92a8 (patch) | |
tree | 8f71cfb37a279805b162f9702839bad856f8dadf /OpenAL32/event.c | |
parent | 395278fcdb2f83ba35b5fba9341bb868af4330b2 (diff) |
Provide messages for the remaining AL errors
Diffstat (limited to 'OpenAL32/event.c')
-rw-r--r-- | OpenAL32/event.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/OpenAL32/event.c b/OpenAL32/event.c index 4e844ce9..88885f52 100644 --- a/OpenAL32/event.c +++ b/OpenAL32/event.c @@ -17,11 +17,9 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A context = GetContextRef(); if(!context) return; - if(count < 0) - SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); + if(count < 0) SETERR_GOTO(context, AL_INVALID_VALUE, 0, "Controlling negative events", done); if(count == 0) goto done; - if(!types) - SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); + if(!types) SETERR_GOTO(context, AL_INVALID_VALUE, 0, "NULL pointer", done); for(i = 0;i < count;i++) { @@ -34,17 +32,16 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A else if(types[i] == AL_EVENT_TYPE_PERFORMANCE_SOFT) flags |= EventType_Performance; else - SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done); + SETERR_GOTO(context, AL_INVALID_ENUM, 0, "Invalid event type", done); } almtx_lock(&context->EventLock); - if(enable) context->EnabledEvts |= flags; else context->EnabledEvts &= ~flags; - almtx_unlock(&context->EventLock); + done: ALCcontext_DecRef(context); } |