diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 66a5396dd5..3524b54ea9 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -6288,6 +6288,27 @@ unsigned menu_displaylist_build_list( switch (type) { + case DISPLAYLIST_ARCHIVE_ACTION: + { + menu_displaylist_build_info_selective_t build_list[] = { +#ifdef HAVE_COMPRESSION + {MENU_ENUM_LABEL_OPEN_ARCHIVE, PARSE_ACTION, true}, +#endif + {MENU_ENUM_LABEL_LOAD_ARCHIVE, PARSE_ACTION, true}, + }; + + for (i = 0; i < ARRAY_SIZE(build_list); i++) + { + if (!build_list[i].checked && !include_everything) + continue; + + if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, + build_list[i].enum_idx, build_list[i].parse_type, + false) == 0) + count++; + } + } + break; case DISPLAYLIST_SUBSYSTEM_SETTINGS_LIST: { runloop_state_t *runloop_st = runloop_state_get_ptr(); @@ -12664,7 +12685,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, MENU_ENUM_LABEL_NO_FAVORITES_AVAILABLE, MENU_INFO_MESSAGE, 0, 0, NULL); info->flags &= ~MD_FLAG_NEED_PUSH_NO_PLAYLIST_ENTRIES; - ret = 0; } ret = 0; @@ -13045,7 +13065,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, * index is less than the current number of menu entries * - if not, we reset the navigation pointer */ size_t selection = menu_navigation_get_selection(); - runloop_state_t *runloop_st = runloop_state_get_ptr(); + runloop_state_t *runloop_st = runloop_state_get_ptr(); menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); @@ -13188,25 +13208,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, info->flags |= MD_FLAG_NEED_PUSH; } break; - case DISPLAYLIST_ARCHIVE_ACTION: - menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); -#ifdef HAVE_COMPRESSION - if (menu_entries_append(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OPEN_ARCHIVE), - msg_hash_to_str(MENU_ENUM_LABEL_OPEN_ARCHIVE), - MENU_ENUM_LABEL_OPEN_ARCHIVE, - 0, 0, 0, NULL)) - count++; -#endif - if (menu_entries_append(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_ARCHIVE), - msg_hash_to_str(MENU_ENUM_LABEL_LOAD_ARCHIVE), - MENU_ENUM_LABEL_LOAD_ARCHIVE, - 0, 0, 0, NULL)) - count++; - - info->flags |= MD_FLAG_NEED_PUSH; - break; case DISPLAYLIST_ARCHIVE_ACTION_DETECT_CORE: menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); #ifdef HAVE_COMPRESSION @@ -13422,6 +13423,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, #ifdef HAVE_MIST case DISPLAYLIST_STEAM_SETTINGS_LIST: #endif + case DISPLAYLIST_ARCHIVE_ACTION: menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); count = menu_displaylist_build_list(info->list, settings, type, false);