Fix scrolling wrap-around in settings menu

This commit is contained in:
Justin Luque 2026-01-04 18:38:55 -05:00
parent 14972b34cb
commit 29cb9634b5
No known key found for this signature in database
GPG Key ID: 5D19058FC4BE922F

View File

@ -114,11 +114,9 @@ void SettingsActivity::loop() {
updateRequired = true; updateRequired = true;
} else if (mappedInput.wasPressed(MappedInputManager::Button::Down) || } else if (mappedInput.wasPressed(MappedInputManager::Button::Down) ||
mappedInput.wasPressed(MappedInputManager::Button::Right)) { mappedInput.wasPressed(MappedInputManager::Button::Right)) {
// Move selection down // Move selection down (with wrap around)
if (selectedSettingIndex < settingsCount - 1) { selectedSettingIndex = (selectedSettingIndex < settingsCount - 1) ? (selectedSettingIndex + 1) : 0;
selectedSettingIndex++; updateRequired = true;
updateRequired = true;
}
} }
} }