mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +00:00
Reset save state index on content load, if auto index is not enabled. (#17391)
This commit is contained in:
parent
857dc8be5a
commit
9e048d8d77
@ -1633,7 +1633,11 @@ void command_event_set_savestate_auto_index(settings_t *settings)
|
|||||||
unsigned max_idx = 0;
|
unsigned max_idx = 0;
|
||||||
bool savestate_auto_index = settings->bools.savestate_auto_index;
|
bool savestate_auto_index = settings->bools.savestate_auto_index;
|
||||||
if (!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;
|
return;
|
||||||
|
}
|
||||||
scan_states(settings, &max_idx, NULL);
|
scan_states(settings, &max_idx, NULL);
|
||||||
configuration_set_int(settings, settings->ints.state_slot, max_idx);
|
configuration_set_int(settings, settings->ints.state_slot, max_idx);
|
||||||
RARCH_LOG("[State]: %s: #%d.\n",
|
RARCH_LOG("[State]: %s: #%d.\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user