aboutsummaryrefslogtreecommitdiffstats
path: root/al/eax/effect.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-03-09 21:46:39 -0800
committerChris Robinson <[email protected]>2023-03-09 21:46:39 -0800
commit605fa7815948cdef42877286f85cc23ed5b3760d (patch)
treef0a5af06beeb7244a2306b08f39414380ae91e67 /al/eax/effect.h
parentf7d051fb7843ea70818b34cfba53a851f551e261 (diff)
Update the effect EAX version only after setting a property
Diffstat (limited to 'al/eax/effect.h')
-rw-r--r--al/eax/effect.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/al/eax/effect.h b/al/eax/effect.h
index 736ac058..a9dcd14d 100644
--- a/al/eax/effect.h
+++ b/al/eax/effect.h
@@ -105,10 +105,7 @@ public:
}
void dispatch(const EaxCall& call) override
- {
- call.is_get() ? get(call) : set(call);
- version_ = call.get_version();
- }
+ { call.is_get() ? get(call) : set(call); }
bool commit() final
{
@@ -176,12 +173,14 @@ private:
void set(const EaxCall& call)
{
- switch (call.get_version())
+ const auto version = call.get_version();
+ switch (version)
{
case 4: set(call, state4_.d); break;
case 5: set(call, state5_.d); break;
default: fail_unknown_version();
}
+ version_ = version;
}
bool commit_state(State4& state)