Do not wrap menu selections.

This commit is contained in:
2025-06-21 23:13:32 -07:00
parent 572b47f9d1
commit fef02d980f

View File

@ -21,8 +21,8 @@
#include "app_state.h"
#include "channel.h"
#include "save_state.h"
#include "display.h"
#include "save_state.h"
AppState app;
StateManager stateManager;
@ -229,8 +229,7 @@ void editChannelParameter(int val) {
}
void updateSelection(int& param, int change, int maxValue) {
// This formula correctly handles positive and negative wrapping.
param = (param + change % maxValue + maxValue) % maxValue;
param = constrain(param + change, 0, maxValue - 1);
}
//