mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-04 09:03:24 +00:00
add setting to enable/disable autoload of config overrides
This commit is contained in:
parent
3ef7d0f4de
commit
bb48ebfb99
@ -657,12 +657,16 @@ end:
|
||||
|
||||
static bool event_init_core(void)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (config_load_override())
|
||||
global->overrides_active = true;
|
||||
else
|
||||
global->overrides_active = false;
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if(settings->auto_overrides_enable)
|
||||
{
|
||||
if (config_load_override())
|
||||
global->overrides_active = true;
|
||||
else
|
||||
global->overrides_active = false;
|
||||
}
|
||||
|
||||
pretro_set_environment(rarch_environment_cb);
|
||||
|
||||
|
@ -491,6 +491,8 @@ static bool default_core_specific_config = true;
|
||||
static bool default_core_specific_config = false;
|
||||
#endif
|
||||
|
||||
static bool default_auto_overrides_enable = false;
|
||||
|
||||
/* Crop overscanned frames. */
|
||||
static const bool crop_overscan = true;
|
||||
|
||||
|
@ -681,6 +681,7 @@ static void config_set_defaults(void)
|
||||
*settings->menu_config_directory = '\0';
|
||||
#endif
|
||||
settings->core_specific_config = default_core_specific_config;
|
||||
settings->auto_overrides_enable = default_auto_overrides_enable;
|
||||
settings->user_language = 0;
|
||||
|
||||
global->console.sound.system_bgm_enable = false;
|
||||
@ -1595,6 +1596,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
config_read_keybinds_conf(conf);
|
||||
|
||||
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_file_free(conf);
|
||||
return true;
|
||||
@ -2467,6 +2469,8 @@ bool config_save_file(const char *path)
|
||||
|
||||
config_set_bool(conf, "core_specific_config",
|
||||
settings->core_specific_config);
|
||||
config_set_bool(conf, "auto_overrides_enable",
|
||||
settings->auto_overrides_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);
|
||||
|
@ -308,6 +308,7 @@ typedef struct settings
|
||||
bool load_dummy_on_core_shutdown;
|
||||
|
||||
bool core_specific_config;
|
||||
bool auto_overrides_enable;
|
||||
|
||||
char username[32];
|
||||
unsigned int user_language;
|
||||
|
12
settings.c
12
settings.c
@ -3626,6 +3626,18 @@ static bool setting_append_list_general_options(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
|
||||
CONFIG_BOOL(
|
||||
settings->auto_overrides_enable,
|
||||
"auto_overrides_enable",
|
||||
"Load Overrides Automatically",
|
||||
default_auto_overrides_enable,
|
||||
"OFF",
|
||||
"ON",
|
||||
group_info.name,
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
|
||||
|
||||
END_SUB_GROUP(list, list_info);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user