diff options
author | Chris Robinson <[email protected]> | 2023-03-11 18:43:17 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-03-11 18:43:17 -0800 |
commit | a9319a794b438a560c0094384ef3aaacf173f0eb (patch) | |
tree | eb956bc45802f7918703da65b921ae6feafb03b4 /al/auxeffectslot.cpp | |
parent | 3f45b3c0c900a6b513d8917cc4df00ca100a7c09 (diff) |
Update the EAX version after setting fx slot properties
Diffstat (limited to 'al/auxeffectslot.cpp')
-rw-r--r-- | al/auxeffectslot.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index dc6e1cfb..e82aab05 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -1427,18 +1427,21 @@ bool ALeffectslot::eax_fx_slot_set(const EaxCall& call) // Returns `true` if all sources should be updated, or `false` otherwise. bool ALeffectslot::eax_set(const EaxCall& call) { - const auto version = call.get_version(); - - if(eax_version_ != version) - eax_df_ = ~EaxDirtyFlags{}; - eax_version_ = version; + bool ret{false}; switch(call.get_property_set_id()) { - case EaxCallPropertySetId::fx_slot: return eax_fx_slot_set(call); - case EaxCallPropertySetId::fx_slot_effect: eax_effect_->set(call); return false; + case EaxCallPropertySetId::fx_slot: ret = eax_fx_slot_set(call); break; + case EaxCallPropertySetId::fx_slot_effect: eax_effect_->set(call); break; default: eax_fail_unknown_property_id(); } + + const auto version = call.get_version(); + if(eax_version_ != version) + eax_df_ = ~EaxDirtyFlags{}; + eax_version_ = version; + + return ret; } void ALeffectslot::eax4_fx_slot_commit(EaxDirtyFlags& dst_df) |