mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-21 06:14:10 +00:00
OpenAL: Enable error checking unconditionally, not only when debug is enabled
This commit is contained in:
parent
bf150995b0
commit
42165755b8
1 changed files with 10 additions and 14 deletions
|
|
@ -39,25 +39,21 @@
|
|||
|
||||
#define CHECK_AL_ERROR \
|
||||
{ \
|
||||
if (isDebugEnabled()) { \
|
||||
int err = alGetError(); \
|
||||
if (err != AL_NO_ERROR) { \
|
||||
jclass cls = (*env)->FindClass(env, "org/lwjgl/openal/OpenALException"); \
|
||||
(*env)->ThrowNew(env, cls, (const char*) alGetString(err)); \
|
||||
(*env)->DeleteLocalRef(env, cls); \
|
||||
} \
|
||||
int err = alGetError(); \
|
||||
if (err != AL_NO_ERROR) { \
|
||||
jclass cls = (*env)->FindClass(env, "org/lwjgl/openal/OpenALException"); \
|
||||
(*env)->ThrowNew(env, cls, (const char*) alGetString(err)); \
|
||||
(*env)->DeleteLocalRef(env, cls); \
|
||||
} \
|
||||
}
|
||||
/* only available if deviceaddress is specified in method */
|
||||
#define CHECK_ALC_ERROR \
|
||||
{ \
|
||||
if (isDebugEnabled()) { \
|
||||
int err = alcGetError((ALCdevice*) deviceaddress); \
|
||||
if (err != AL_NO_ERROR) { \
|
||||
jclass cls = (*env)->FindClass(env, "org/lwjgl/openal/OpenALException"); \
|
||||
(*env)->ThrowNew(env, cls, (const char*) alcGetString((ALCdevice*) deviceaddress, err)); \
|
||||
(*env)->DeleteLocalRef(env, cls); \
|
||||
} \
|
||||
int err = alcGetError((ALCdevice*) deviceaddress); \
|
||||
if (err != AL_NO_ERROR) { \
|
||||
jclass cls = (*env)->FindClass(env, "org/lwjgl/openal/OpenALException"); \
|
||||
(*env)->ThrowNew(env, cls, (const char*) alcGetString((ALCdevice*) deviceaddress, err)); \
|
||||
(*env)->DeleteLocalRef(env, cls); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue