diff options
-rw-r--r-- | Alc/ALc.c | 1 | ||||
-rw-r--r-- | OpenAL32/alError.c | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -1731,6 +1731,7 @@ void ALCcontext_ProcessUpdates(ALCcontext *context) */ static void alcSetError(ALCdevice *device, ALCenum errorCode) { + WARN("Error generated on device %p, code 0x%04x\n", device, errorCode); if(TrapALCError) { #ifdef _WIN32 diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c index 6b7684ce..19fcaa6d 100644 --- a/OpenAL32/alError.c +++ b/OpenAL32/alError.c @@ -36,6 +36,8 @@ ALboolean TrapALError = AL_FALSE; ALvoid alSetError(ALCcontext *Context, ALenum errorCode) { ALenum curerr = AL_NO_ERROR; + + WARN("Error generated on context %p, code 0x%04x\n", Context, errorCode); if(TrapALError) { #ifdef _WIN32 @@ -46,6 +48,7 @@ ALvoid alSetError(ALCcontext *Context, ALenum errorCode) raise(SIGTRAP); #endif } + ATOMIC_COMPARE_EXCHANGE_STRONG_SEQ(ALenum, &Context->LastError, &curerr, errorCode); } @@ -57,6 +60,8 @@ AL_API ALenum AL_APIENTRY alGetError(void) Context = GetContextRef(); if(!Context) { + WARN("Querying error state on null context (implicitly 0x%04x)\n", + AL_INVALID_OPERATION); if(TrapALError) { #ifdef _WIN32 |