From cc5b069494da7b7fb3760ca0192b0df5b0e1713a Mon Sep 17 00:00:00 2001 From: radius Date: Mon, 25 May 2015 20:54:00 -0500 Subject: [PATCH] make sure to reset paths when exiting too --- frontend/frontend.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/frontend.c b/frontend/frontend.c index 69fd4dff65..44d81c661a 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -38,6 +38,12 @@ void main_exit_save_config(void) if (settings->config_save_on_exit && *global->config_path) { + /* restore original paths in case per-core organization is enabled */ + if (settings->sort_savefiles_enable && orig_savefile_dir != '\0') + strlcpy(global->savefile_dir,orig_savefile_dir,sizeof(global->savefile_dir)); + if (settings->sort_savestates_enable && orig_savestate_dir != '\0') + strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir)); + /* Save last core-specific config to the default config location, * needed on consoles for core switching and reusing last good * config for new cores.