diff --git a/config.def.h b/config.def.h index ffe1e99ce5..2af3cd8931 100644 --- a/config.def.h +++ b/config.def.h @@ -511,8 +511,6 @@ static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE; /* Save configuration file on exit. */ static bool config_save_on_exit = true; -static const bool default_overlay_enable = false; - static const bool overlay_hide_in_menu = true; #ifdef HAVE_MENU diff --git a/configuration.c b/configuration.c index 9f04d7a4a8..30ac13d75c 100644 --- a/configuration.c +++ b/configuration.c @@ -412,6 +412,13 @@ const char *config_get_default_location(void) return "null"; } +bool config_overlay_enable_default(void) +{ + if (g_defaults.overlay.set) + return g_defaults.overlay.enable; + return true; +} + /** * config_set_defaults: * @@ -696,10 +703,7 @@ static void config_set_defaults(void) sizeof(settings->network.buildbot_assets_url)); settings->network.buildbot_auto_extract_archive = true; - if (g_defaults.overlay.set) - settings->input.overlay_enable = g_defaults.overlay.enable; - else - settings->input.overlay_enable = true; + settings->input.overlay_enable = config_overlay_enable_default(); settings->input.overlay_enable_autopreferred = true; settings->input.overlay_hide_in_menu = overlay_hide_in_menu; diff --git a/configuration.h b/configuration.h index dd7a9b7b18..42971cf2ee 100644 --- a/configuration.h +++ b/configuration.h @@ -655,6 +655,8 @@ bool config_replace(char *path); bool config_init(void); +bool config_overlay_enable_default(void); + void config_free(void); const char *config_get_active_path(void); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index a753a2233c..09fabaeaab 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -6457,7 +6457,7 @@ static bool setting_append_list( &settings->input.overlay_enable, msg_hash_to_str(MENU_ENUM_LABEL_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_ON), &group_info,