From a82492a68151037a39394c04f74cdfff586504fd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 15 Dec 2016 12:07:02 +0100 Subject: [PATCH] Cleanup config_unload_override --- configuration.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/configuration.c b/configuration.c index 037dfb670b..0f6ee0a82c 100644 --- a/configuration.c +++ b/configuration.c @@ -2349,18 +2349,16 @@ bool config_unload_override(void) retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL); retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL); - if (config_load_file(path_get(RARCH_PATH_CONFIG), false, config_get_ptr())) - { - RARCH_LOG("[overrides] configuration overrides unloaded, original configuration restored.\n"); + if (!config_load_file(path_get(RARCH_PATH_CONFIG), false, config_get_ptr())) + return false; - /* Reset save paths */ - retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL); - retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL); + RARCH_LOG("[overrides] configuration overrides unloaded, original configuration restored.\n"); - return true; - } + /* Reset save paths */ + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL); + retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL); - return false; + return true; } /**