mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-03 15:54:39 +00:00
make sure remap path is cleared if an auto remap file is not found
This commit is contained in:
parent
2474c20084
commit
70a54e6fcb
@ -1753,7 +1753,7 @@ bool config_load_override(void)
|
||||
global_t *global = global_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))
|
||||
{
|
||||
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))
|
||||
return true;
|
||||
}
|
||||
else
|
||||
RARCH_LOG("No game-specific remap found at %s.\n", game_path);
|
||||
else
|
||||
{
|
||||
RARCH_LOG("No core-specific remap found at %s.\n", core_path);
|
||||
*settings->input.remapping_path= '\0';
|
||||
input_remapping_set_defaults();
|
||||
}
|
||||
|
||||
new_conf = NULL;
|
||||
|
||||
@ -1841,7 +1845,12 @@ bool config_load_remap(void)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("No core-specific remap found at %s.\n", core_path);
|
||||
*settings->input.remapping_path= '\0';
|
||||
input_remapping_set_defaults();
|
||||
}
|
||||
|
||||
|
||||
new_conf = NULL;
|
||||
|
||||
|
@ -664,7 +664,6 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
|
||||
if (global->system.core_options)
|
||||
{
|
||||
core_option_flush(global->system.core_options);
|
||||
core_option_free(global->system.core_options);
|
||||
}
|
||||
|
||||
|
10
retroarch.c
10
retroarch.c
@ -1853,15 +1853,15 @@ static void deinit_core(bool reinit)
|
||||
|
||||
if (reinit)
|
||||
rarch_main_command(RARCH_CMD_DRIVERS_DEINIT);
|
||||
|
||||
|
||||
if(global->system.core_options)
|
||||
core_option_flush(global->system.core_options);
|
||||
|
||||
if(global->overrides_active)
|
||||
{
|
||||
config_unload_override();
|
||||
pretro_set_environment(rarch_environment_cb);
|
||||
{
|
||||
config_unload_override();
|
||||
}
|
||||
|
||||
pretro_set_environment(rarch_environment_cb);
|
||||
uninit_libretro_sym();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user