make sure remap path is cleared if an auto remap file is not found

This commit is contained in:
radius 2015-04-06 21:54:59 -05:00
parent 2474c20084
commit 70a54e6fcb
3 changed files with 17 additions and 9 deletions

View File

@ -1753,7 +1753,7 @@ bool config_load_override(void)
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
*global->append_config_path = '\0'; *global->append_config_path = NULL;
if (config_load_file(global->config_path, false)) if (config_load_file(global->config_path, false))
{ {
RARCH_LOG("Configuration overrides unloaded, original configuration reset\n"); RARCH_LOG("Configuration overrides unloaded, original configuration reset\n");
@ -1825,8 +1825,12 @@ bool config_load_remap(void)
if(input_remapping_load_file(game_path)) if(input_remapping_load_file(game_path))
return true; return true;
} }
else else
RARCH_LOG("No game-specific remap found at %s.\n", game_path); {
RARCH_LOG("No core-specific remap found at %s.\n", core_path);
*settings->input.remapping_path= '\0';
input_remapping_set_defaults();
}
new_conf = NULL; new_conf = NULL;
@ -1841,7 +1845,12 @@ bool config_load_remap(void)
return true; return true;
} }
else else
{
RARCH_LOG("No core-specific remap found at %s.\n", core_path); RARCH_LOG("No core-specific remap found at %s.\n", core_path);
*settings->input.remapping_path= '\0';
input_remapping_set_defaults();
}
new_conf = NULL; new_conf = NULL;

View File

@ -664,7 +664,6 @@ bool rarch_environment_cb(unsigned cmd, void *data)
if (global->system.core_options) if (global->system.core_options)
{ {
core_option_flush(global->system.core_options);
core_option_free(global->system.core_options); core_option_free(global->system.core_options);
} }

View File

@ -1853,15 +1853,15 @@ static void deinit_core(bool reinit)
if (reinit) if (reinit)
rarch_main_command(RARCH_CMD_DRIVERS_DEINIT); rarch_main_command(RARCH_CMD_DRIVERS_DEINIT);
if(global->system.core_options)
core_option_flush(global->system.core_options);
if(global->overrides_active) if(global->overrides_active)
{ {
config_unload_override(); config_unload_override();
pretro_set_environment(rarch_environment_cb);
} }
pretro_set_environment(rarch_environment_cb);
uninit_libretro_sym(); uninit_libretro_sym();
} }