Skip to content

Commit a8dc705

Browse files
committed
Fix runtime log state slot saving with override unloading
1 parent f754e91 commit a8dc705

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

retroarch.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8082,18 +8082,19 @@ bool retroarch_main_init(int argc, char *argv[])
80828082
else
80838083
input_remapping_restore_global_config(true, false);
80848084

8085-
#ifdef HAVE_CONFIGFILE
8086-
/* Reload the original config */
8087-
if (runloop_st->flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
8088-
config_unload_override();
8089-
#endif
8090-
80918085
#ifdef HAVE_DYNAMIC
80928086
/* Ensure that currently loaded core is properly
80938087
* deinitialised */
80948088
if (runloop_st->current_core_type != CORE_TYPE_DUMMY)
80958089
command_event(CMD_EVENT_CORE_DEINIT, NULL);
80968090
#endif
8091+
8092+
#ifdef HAVE_CONFIGFILE
8093+
/* Reload the original config */
8094+
if (runloop_st->flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
8095+
config_unload_override();
8096+
#endif
8097+
80978098
/* Attempt initializing dummy core */
80988099
runloop_st->current_core_type = CORE_TYPE_DUMMY;
80998100
if (!command_event(CMD_EVENT_CORE_INIT, &runloop_st->current_core_type))
@@ -8681,6 +8682,12 @@ bool retroarch_main_quit(void)
86818682
* save state file may be truncated) */
86828683
content_wait_for_save_state_task();
86838684

8685+
runloop_runtime_log_deinit(runloop_st,
8686+
settings->bools.content_runtime_log,
8687+
settings->bools.content_runtime_log_aggregate,
8688+
settings->paths.directory_runtime_log,
8689+
settings->paths.directory_playlist);
8690+
86848691
if ( (runloop_st->flags & RUNLOOP_FLAG_REMAPS_CORE_ACTIVE)
86858692
|| (runloop_st->flags & RUNLOOP_FLAG_REMAPS_CONTENT_DIR_ACTIVE)
86868693
|| (runloop_st->flags & RUNLOOP_FLAG_REMAPS_GAME_ACTIVE)
@@ -8694,11 +8701,9 @@ bool retroarch_main_quit(void)
86948701
input_remapping_restore_global_config(true, false);
86958702

86968703
#ifdef HAVE_CONFIGFILE
8704+
/* Reload the original config */
86978705
if (runloop_st->flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
8698-
{
8699-
/* Reload the original config */
87008706
config_unload_override();
8701-
}
87028707
#endif
87038708

87048709
#ifdef HAVE_MENU

runloop.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,6 @@ static void runloop_update_runtime_log(
660660
free(runtime_log);
661661
}
662662

663-
664663
void runloop_runtime_log_deinit(
665664
runloop_state_t *runloop_st,
666665
bool content_runtime_log,
@@ -4125,11 +4124,9 @@ void runloop_event_deinit_core(void)
41254124
driver_uninit(DRIVERS_CMD_ALL, (enum driver_lifetime_flags)0);
41264125

41274126
#ifdef HAVE_CONFIGFILE
4127+
/* Reload the original config */
41284128
if (runloop_st->flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
4129-
{
4130-
/* Reload the original config */
41314129
config_unload_override();
4132-
}
41334130
#endif
41344131
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
41354132
runloop_st->runtime_shader_preset_path[0] = '\0';

0 commit comments

Comments
 (0)