refactor save state to allow persisting a transient state prior to explicitly saving to a slot.

This commit is contained in:
2025-07-04 10:19:39 -07:00
parent f7ff03d5b6
commit e664f6c17b
4 changed files with 68 additions and 63 deletions

View File

@ -179,13 +179,13 @@ void HandleEncoderPressed() {
}
if (app.selected_param == PARAM_MAIN_SAVE_DATA) {
if (app.selected_sub_param < MAX_SAVE_SLOTS) {
app.selected_save_slot = app.selected_sub_param - 1;
app.selected_save_slot = app.selected_sub_param;
stateManager.saveData(app);
}
}
if (app.selected_param == PARAM_MAIN_LOAD_DATA) {
if (app.selected_sub_param < MAX_SAVE_SLOTS) {
app.selected_save_slot = app.selected_sub_param - 1;
app.selected_save_slot = app.selected_sub_param;
stateManager.loadData(app, app.selected_save_slot);
InitGravity(app);
}