Skip to content

Commit 2afcfec

Browse files
committed
Add detailed comments to clarify autoplay mode handling in Helios class. Enhanced documentation for the autoplay feature to improve code readability and maintainability.
1 parent dcfd693 commit 2afcfec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Helios/Helios.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ void Helios::handle_state_modes()
288288
return;
289289
}
290290

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
291294
if (has_flag(FLAG_AUTOPLAY) && !Button::isPressed()) {
292295
uint32_t current_time = Time::getCurtime();
293296
if (current_time - last_mode_switch_time >= AUTOPLAY_DURATION) {

0 commit comments

Comments
 (0)