mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
add setting to enable/disable autoload of remap files
This commit is contained in:
parent
bb48ebfb99
commit
e2479ade31
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
13
settings.c
13
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user