aboutsummaryrefslogtreecommitdiffstats
path: root/al/auxeffectslot.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-03-11 18:43:17 -0800
committerChris Robinson <[email protected]>2023-03-11 18:43:17 -0800
commita9319a794b438a560c0094384ef3aaacf173f0eb (patch)
treeeb956bc45802f7918703da65b921ae6feafb03b4 /al/auxeffectslot.cpp
parent3f45b3c0c900a6b513d8917cc4df00ca100a7c09 (diff)
Update the EAX version after setting fx slot properties
Diffstat (limited to 'al/auxeffectslot.cpp')
-rw-r--r--al/auxeffectslot.cpp17
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)