From 3fd8d0e1d2b5d3f604394af2a06c9eb4bdf9af91 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 23 Jul 2016 14:22:04 +0200 Subject: [PATCH] Start using config_get_active_path --- command.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/command.c b/command.c index c32c57e477..805c5c6a0b 100644 --- a/command.c +++ b/command.c @@ -1546,19 +1546,18 @@ void command_event_save_current_config(void) if (settings->config_save_on_exit && !string_is_empty(global->path.config)) { - bool ret = false; - char msg[128] = {0}; + bool ret = false; + char msg[128] = {0}; + const char *config_path = config_get_active_path(); + /* Save last core-specific config to the default config location, * needed on consoles for core switching and reusing last good * config for new cores. */ /* Flush out the core specific config. */ - if (!string_is_empty(global->path.core_specific_config) - && settings->core_specific_config) - ret = config_save_file(global->path.core_specific_config); - else - ret = config_save_file(global->path.config); + if (config_path) + ret = config_save_file(config_path); if (ret) {