diff options
author | Chris Robinson <[email protected]> | 2011-09-12 01:50:57 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-12 01:50:57 -0700 |
commit | 9f159bfb339b626267fd28cae8fde3328341c99e (patch) | |
tree | 5c656d0c1e07fc5f24c247ae585fdf66b32d9b3f /Alc | |
parent | c2e9cda2d15c07090eaa3c60d6b6892cf6cda6a0 (diff) |
Look for __ALSOFT_TRAP_ERROR to trap both AL and ALC errors
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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); |