diff options
author | Chris Robinson <[email protected]> | 2012-04-16 20:13:50 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-04-16 20:13:50 -0700 |
commit | f6a1e53f191212112a5c31803c7018387d8aa715 (patch) | |
tree | a48acf3092b06552222144403d96839c98aa2faa /Alc | |
parent | a0a015f19fcda6fe1ccd6d20f361a2abedbddc1a (diff) |
Read ALSOFT_TRAP_*ERROR when reading the config
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 38 |
1 files changed, 17 insertions, 21 deletions
@@ -498,23 +498,6 @@ static void alc_init(void) if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1)) ZScale = -1.0f; - str = getenv("ALSOFT_TRAP_ERROR"); - if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1)) - { - 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; - } - pthread_key_create(&LocalContext, ReleaseThreadCtx); InitializeCriticalSection(&ListLock); ThunkInit(); @@ -605,11 +588,24 @@ static void alc_initconfig(void) } } - if(!TrapALCError) - TrapALCError = GetConfigValueBool(NULL, "trap-alc-error", ALC_FALSE); + str = getenv("ALSOFT_TRAP_ERROR"); + if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1)) + { + 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; + TrapALError = GetConfigValueBool(NULL, "trap-al-error", TrapALError); - if(!TrapALError) - TrapALError = GetConfigValueBool(NULL, "trap-al-error", AL_FALSE); + str = getenv("ALSOFT_TRAP_ALC_ERROR"); + if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1)) + TrapALCError = ALC_TRUE; + TrapALCError = GetConfigValueBool(NULL, "trap-alc-error", TrapALCError); + } if(ConfigValueFloat("reverb", "boost", &valf)) ReverbBoost *= aluPow(10.0f, valf / 20.0f); |