diff --git a/command_event.c b/command_event.c index 5e49b81a84..04afd06280 100644 --- a/command_event.c +++ b/command_event.c @@ -670,7 +670,8 @@ static bool event_init_core(void) pretro_set_environment(rarch_environment_cb); - config_load_remap(); + if(settings->auto_remaps_enable) + config_load_remap(); rarch_verify_api_version(); pretro_init(); diff --git a/config.def.h b/config.def.h index c5c6467942..0fce8c2839 100644 --- a/config.def.h +++ b/config.def.h @@ -492,6 +492,7 @@ static bool default_core_specific_config = false; #endif static bool default_auto_overrides_enable = false; +static bool default_auto_remaps_enable = false; /* Crop overscanned frames. */ static const bool crop_overscan = true; diff --git a/configuration.c b/configuration.c index f017328fff..f62fb83af1 100644 --- a/configuration.c +++ b/configuration.c @@ -682,6 +682,7 @@ static void config_set_defaults(void) #endif settings->core_specific_config = default_core_specific_config; settings->auto_overrides_enable = default_auto_overrides_enable; + settings->auto_remaps_enable = default_auto_remaps_enable; settings->user_language = 0; global->console.sound.system_bgm_enable = false; @@ -1597,6 +1598,7 @@ static bool config_load_file(const char *path, bool set_defaults) CONFIG_GET_BOOL_BASE(conf, settings, core_specific_config, "core_specific_config"); CONFIG_GET_BOOL_BASE(conf, settings, auto_overrides_enable, "auto_overrides_enable"); + CONFIG_GET_BOOL_BASE(conf, settings, auto_remaps_enable, "auto_remaps_enable"); config_file_free(conf); return true; @@ -2471,6 +2473,8 @@ bool config_save_file(const char *path) settings->core_specific_config); config_set_bool(conf, "auto_overrides_enable", settings->auto_overrides_enable); + config_set_bool(conf, "auto_remaps_enable", + settings->auto_remaps_enable); config_set_int(conf, "libretro_log_level", settings->libretro_log_level); config_set_bool(conf, "log_verbosity", global->verbosity); config_set_bool(conf, "perfcnt_enable", global->perfcnt_enable); diff --git a/configuration.h b/configuration.h index e05eb94e0a..cb82a7c52e 100644 --- a/configuration.h +++ b/configuration.h @@ -309,6 +309,7 @@ typedef struct settings bool core_specific_config; bool auto_overrides_enable; + bool auto_remaps_enable; char username[32]; unsigned int user_language; diff --git a/settings.c b/settings.c index d90cc93d4f..4634c18369 100644 --- a/settings.c +++ b/settings.c @@ -3629,7 +3629,7 @@ static bool setting_append_list_general_options( CONFIG_BOOL( settings->auto_overrides_enable, "auto_overrides_enable", - "Load Overrides Automatically", + "Load Override Files Automatically", default_auto_overrides_enable, "OFF", "ON", @@ -3638,6 +3638,17 @@ static bool setting_append_list_general_options( general_write_handler, general_read_handler); + CONFIG_BOOL( + settings->auto_remaps_enable, + "auto_remaps_enable", + "Load Remap Files Automatically", + default_auto_remaps_enable, + "OFF", + "ON", + group_info.name, + subgroup_info.name, + general_write_handler, + general_read_handler); END_SUB_GROUP(list, list_info);