diff options
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); |