From 9e048d8d77d9a46054ae68462e4df3c4fd16f7e0 Mon Sep 17 00:00:00 2001 From: zoltanvb <101990835+zoltanvb@users.noreply.github.com> Date: Sat, 11 Jan 2025 02:50:35 +0100 Subject: [PATCH] Reset save state index on content load, if auto index is not enabled. (#17391) --- command.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command.c b/command.c index 4e7c72f142f..d26ca11a119 100644 --- a/command.c +++ b/command.c @@ -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",