diff options
author | Chris Robinson <[email protected]> | 2008-11-14 07:13:59 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-11-14 07:13:59 -0800 |
commit | d72b132c57145bd6cd4c531fe0a8c65b348c2c29 (patch) | |
tree | 910ffeef08d6b278e12da0032867efed2bb58ee7 /OpenAL32/alEffect.c | |
parent | 506912aed7a1ae84fbc0407741c85ac2d5e109d2 (diff) |
Add an option to disable specific EFX effect types
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r-- | OpenAL32/alEffect.c | 10 |
1 files changed, 8 insertions, 2 deletions
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); |