From 9f159bfb339b626267fd28cae8fde3328341c99e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 12 Sep 2011 01:50:57 -0700 Subject: [PATCH] Look for __ALSOFT_TRAP_ERROR to trap both AL and ALC errors --- Alc/ALc.c | 19 ++++++++++++++----- 1 file 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); -- 2.11.4.GIT