Error on enabling an effect on a Source with effects disabled;

This commit is contained in:
bjorn 2021-08-12 11:25:51 -07:00
parent 25ffcf9dd1
commit 1fdaa797ac
1 changed files with 2 additions and 1 deletions

View File

@ -597,7 +597,8 @@ bool lovrSourceIsEffectEnabled(Source* source, Effect effect) {
}
void lovrSourceSetEffectEnabled(Source* source, Effect effect, bool enabled) {
if (enabled && source->effects != EFFECT_NONE) {
lovrCheck(source->effects != EFFECT_NONE, "Unable to change effects on a Source with effects disabled");
if (enabled) {
source->effects |= (1 << effect);
} else {
source->effects &= ~(1 << effect);