From d72b132c57145bd6cd4c531fe0a8c65b348c2c29 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 14 Nov 2008 07:13:59 -0800 Subject: Add an option to disable specific EFX effect types --- OpenAL32/alEffect.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenAL32/alEffect.c') diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index 8f52bcaf..939b663f 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -29,6 +29,10 @@ #include "alThunk.h" #include "alError.h" + +ALboolean DisabledEffects[MAX_EFFECTS]; + + static ALeffect *g_EffectList; static ALuint g_EffectCount; @@ -165,8 +169,10 @@ ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue) if(param == AL_EFFECT_TYPE) { - if(iValue == AL_EFFECT_NULL || - iValue == AL_EFFECT_REVERB) + ALboolean isOk = (iValue == AL_EFFECT_NULL || + (iValue == AL_EFFECT_REVERB && !DisabledEffects[REVERB])); + + if(isOk) InitEffectParams(ALEffect, iValue); else alSetError(AL_INVALID_VALUE); -- cgit v1.2.3