From a9319a794b438a560c0094384ef3aaacf173f0eb Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 11 Mar 2023 18:43:17 -0800 Subject: [PATCH] Update the EAX version after setting fx slot properties --- al/auxeffectslot.cpp | 17 ++++++++++------- 1 file 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) -- 2.11.4.GIT