diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 66cd9c9cc9..6167fc8594 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3379,6 +3379,8 @@ static int menu_displaylist_parse_cores( return 0; } + info->download_core = true; + dir_list_sort(str_list, true); list_size = str_list->size; @@ -3390,13 +3392,6 @@ static int menu_displaylist_parse_cores( msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), MENU_ENUM_LABEL_NO_ITEMS, MENU_SETTING_NO_ITEM, 0, 0); -#ifdef HAVE_NETWORKING - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE), - msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST), - MENU_ENUM_LABEL_CORE_UPDATER_LIST, - MENU_SETTING_ACTION, 0, 0); -#endif string_list_free(str_list); @@ -3875,6 +3870,17 @@ static bool menu_displaylist_push_list_process(menu_displaylist_info_t *info) MENU_SETTING_ACTION, 0, 0); } +#ifdef HAVE_NETWORKING + if (info->download_core) + { + menu_entries_prepend(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE), + msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST), + MENU_ENUM_LABEL_CORE_UPDATER_LIST, + MENU_SETTING_ACTION, 0, 0); + } +#endif + if (info->need_refresh) menu_entries_ctl(MENU_ENTRIES_CTL_REFRESH, info->list); @@ -5816,13 +5822,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) msg_hash_to_str(MENU_ENUM_LABEL_NO_CORES_AVAILABLE), MENU_ENUM_LABEL_NO_CORES_AVAILABLE, 0, 0, 0); -#ifdef HAVE_NETWORKING - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE), - msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST), - MENU_ENUM_LABEL_CORE_UPDATER_LIST, - MENU_SETTING_ACTION, 0, 0); -#endif + info->download_core = true; } else { diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 4f3650405e..3efb4063be 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -165,6 +165,7 @@ typedef struct menu_displaylist_info bool need_push; bool need_clear; bool push_builtin_cores; + bool download_core; bool need_navigation_clear; file_list_t *list; file_list_t *menu_list;