Update selected save slot when start with cli --entryslot

This commit is contained in:
gugueU 2022-12-30 14:38:21 +01:00 committed by LibretroAdmin
parent 48d3cca8b2
commit b6aa95cf16
3 changed files with 6 additions and 3 deletions

View File

@ -1206,7 +1206,7 @@ void command_event_init_cheats(
}
#endif
bool command_event_load_entry_state(void)
bool command_event_load_entry_state(settings_t *settings)
{
char entry_state_path[PATH_MAX_LENGTH];
int entry_path_stats;
@ -1248,6 +1248,9 @@ bool command_event_load_entry_state(void)
entry_state_path, ret ? "succeeded" : "failed"
);
if (ret)
configuration_set_int(settings, settings->ints.state_slot, runloop_st->entry_state_slot);
return ret;
}

View File

@ -391,7 +391,7 @@ void command_event_set_volume(
void command_event_init_controllers(rarch_system_info_t *info,
settings_t *settings, unsigned num_active_users);
bool command_event_load_entry_state(void);
bool command_event_load_entry_state(settings_t *settings);
void command_event_load_auto_state(void);

View File

@ -5359,7 +5359,7 @@ static bool event_init_content(
if (!cheevos_enable || !cheevos_hardcore_mode_enable)
#endif
{
if (runloop_st->entry_state_slot && !command_event_load_entry_state())
if (runloop_st->entry_state_slot && !command_event_load_entry_state(settings))
runloop_st->entry_state_slot = 0;
if (!runloop_st->entry_state_slot && settings->bools.savestate_auto_load)
command_event_load_auto_state();