Skip to content

Commit

Permalink
Reset save state index on content load, if auto index is not enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanvb committed Jan 10, 2025
1 parent 1e32a1e commit d2bdda4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions command.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,11 @@ void command_event_set_savestate_auto_index(settings_t *settings)
unsigned max_idx = 0;
bool savestate_auto_index = settings->bools.savestate_auto_index;
if (!savestate_auto_index)
{
/* Reset savestate index to 0 when loading content. */
configuration_set_int(settings, settings->ints.state_slot, 0);
return;
}
scan_states(settings, &max_idx, NULL);
configuration_set_int(settings, settings->ints.state_slot, max_idx);
RARCH_LOG("[State]: %s: #%d.\n",
Expand Down

0 comments on commit d2bdda4

Please sign in to comment.