File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -288,11 +288,17 @@ void Helios::handle_state_modes()
288288 return ;
289289 }
290290
291- // Check for autoplay mode switching
292- if (has_flag (FLAG_AUTOPLAY) && hasReleased && !Button::isPressed ()) {
291+ // This handles iterating the mode forward when the autoplay feature is
292+ // enabled. The modes automatically cycle forward every AUTOPLAY_DURATION ticks
293+ // but only if the button isn't pressed to avoid iterating while opening menus
294+ if (has_flag (FLAG_AUTOPLAY) && !Button::isPressed ()) {
293295 uint32_t current_time = Time::getCurtime ();
294296 if (current_time - last_mode_switch_time >= AUTOPLAY_DURATION) {
295- load_next_mode ();
297+ // If a pattern has a single cycle that is longer than the autoplay duration,
298+ // prevent the mode switch from interrupting the pattern so the full cycle can be seen.
299+ if (pat.colorset ().numColors () <= 1 || pat.colorset ().onStart ()) {
300+ load_next_mode ();
301+ }
296302 }
297303 }
298304
You can’t perform that action at this time.
0 commit comments