aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-12 01:50:57 -0700
committerChris Robinson <[email protected]>2011-09-12 01:50:57 -0700
commit9f159bfb339b626267fd28cae8fde3328341c99e (patch)
tree5c656d0c1e07fc5f24c247ae585fdf66b32d9b3f /Alc/ALc.c
parentc2e9cda2d15c07090eaa3c60d6b6892cf6cda6a0 (diff)
Look for __ALSOFT_TRAP_ERROR to trap both AL and ALC errors
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index dec87990..f5fa09e1 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -503,13 +503,22 @@ static void alc_init(void)
if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
ZScale = -1.0;
- str = getenv("__ALSOFT_TRAP_AL_ERROR");
+ str = getenv("__ALSOFT_TRAP_ERROR");
if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
- TrapALError = AL_TRUE;
+ {
+ TrapALError = AL_TRUE;
+ TrapALCError = AL_TRUE;
+ }
+ else
+ {
+ str = getenv("__ALSOFT_TRAP_AL_ERROR");
+ if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
+ TrapALError = AL_TRUE;
- str = getenv("__ALSOFT_TRAP_ALC_ERROR");
- if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
- TrapALCError = ALC_TRUE;
+ str = getenv("__ALSOFT_TRAP_ALC_ERROR");
+ if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
+ TrapALCError = ALC_TRUE;
+ }
pthread_key_create(&LocalContext, ReleaseThreadCtx);
InitializeCriticalSection(&ListLock);