From f2107bc274064318c4bf132d11861b9f2f05332d Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sun, 18 Jan 2026 20:05:15 +0100 Subject: [PATCH] animartrix bugfix: segment options changes not considered * changing segment options (mirror, transpose) must lead to new call of "init" * indentation fixes --- .../usermod_v2_animartrix/usermod_v2_animartrix.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usermods/usermod_v2_animartrix/usermod_v2_animartrix.h b/usermods/usermod_v2_animartrix/usermod_v2_animartrix.h index 5de9977f..34e00ee0 100644 --- a/usermods/usermod_v2_animartrix/usermod_v2_animartrix.h +++ b/usermods/usermod_v2_animartrix/usermod_v2_animartrix.h @@ -128,16 +128,15 @@ class ANIMartRIXMod:public ANIMartRIX { bool use_gamma = false; public: void initEffect() { - if (SEGENV.call == 0) { - init(SEGMENT.virtualWidth(), SEGMENT.virtualHeight(), false); + if ((SEGENV.call == 0) || (SEGMENT.virtualWidth() != num_x) || (SEGMENT.virtualHeight() != num_y)) { + init(SEGMENT.virtualWidth(), SEGMENT.virtualHeight(), false); } float speedFactor = 1.0; if (SEGMENT.speed < 128) { - speedFactor = (float) map(SEGMENT.speed, 0, 127, 1, 100) / 100.0f; + speedFactor = (float) map(SEGMENT.speed, 0, 127, 1, 100) / 100.0f; + } else { + speedFactor = (float) map(SEGMENT.speed, 128, 255, 10, 100) / 10.0f; } - else{ - speedFactor = (float) map(SEGMENT.speed, 128, 255, 10, 100) / 10.0f; - } use_gamma = SEGENV.check2; setSpeedFactor(speedFactor); }