Create config_overlay_enable_default
This commit is contained in:
parent
b126b9627d
commit
2bcdaf2c57
|
@ -511,8 +511,6 @@ static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
|
||||||
/* Save configuration file on exit. */
|
/* Save configuration file on exit. */
|
||||||
static bool config_save_on_exit = true;
|
static bool config_save_on_exit = true;
|
||||||
|
|
||||||
static const bool default_overlay_enable = false;
|
|
||||||
|
|
||||||
static const bool overlay_hide_in_menu = true;
|
static const bool overlay_hide_in_menu = true;
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
|
|
|
@ -412,6 +412,13 @@ const char *config_get_default_location(void)
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool config_overlay_enable_default(void)
|
||||||
|
{
|
||||||
|
if (g_defaults.overlay.set)
|
||||||
|
return g_defaults.overlay.enable;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* config_set_defaults:
|
* config_set_defaults:
|
||||||
*
|
*
|
||||||
|
@ -696,10 +703,7 @@ static void config_set_defaults(void)
|
||||||
sizeof(settings->network.buildbot_assets_url));
|
sizeof(settings->network.buildbot_assets_url));
|
||||||
settings->network.buildbot_auto_extract_archive = true;
|
settings->network.buildbot_auto_extract_archive = true;
|
||||||
|
|
||||||
if (g_defaults.overlay.set)
|
settings->input.overlay_enable = config_overlay_enable_default();
|
||||||
settings->input.overlay_enable = g_defaults.overlay.enable;
|
|
||||||
else
|
|
||||||
settings->input.overlay_enable = true;
|
|
||||||
|
|
||||||
settings->input.overlay_enable_autopreferred = true;
|
settings->input.overlay_enable_autopreferred = true;
|
||||||
settings->input.overlay_hide_in_menu = overlay_hide_in_menu;
|
settings->input.overlay_hide_in_menu = overlay_hide_in_menu;
|
||||||
|
|
|
@ -655,6 +655,8 @@ bool config_replace(char *path);
|
||||||
|
|
||||||
bool config_init(void);
|
bool config_init(void);
|
||||||
|
|
||||||
|
bool config_overlay_enable_default(void);
|
||||||
|
|
||||||
void config_free(void);
|
void config_free(void);
|
||||||
|
|
||||||
const char *config_get_active_path(void);
|
const char *config_get_active_path(void);
|
||||||
|
|
|
@ -6457,7 +6457,7 @@ static bool setting_append_list(
|
||||||
&settings->input.overlay_enable,
|
&settings->input.overlay_enable,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE),
|
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE),
|
||||||
true,
|
config_overlay_enable_default(),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON),
|
||||||
&group_info,
|
&group_info,
|
||||||
|
|
Loading…
Reference in New Issue