aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alError.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-02-27 20:56:34 -0800
committerChris Robinson <[email protected]>2017-02-27 20:59:52 -0800
commit52d1f7883b9ff83ff1e3b7d7109e76003361b860 (patch)
treeb880af87ee68a52a550cff9d69028a766de73726 /OpenAL32/alError.c
parent45d6c34015a5dc971d1e3ca095ad758339c46441 (diff)
Print WARNs when a device or context error is generated
Diffstat (limited to 'OpenAL32/alError.c')
-rw-r--r--OpenAL32/alError.c5
1 files changed, 5 insertions, 0 deletions
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