From 840ff59dd0cc735498f7387231539ddb7750cc64 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 10 Jul 2016 19:35:01 +0200 Subject: [PATCH] Remove SL_FLAG_ALLOW_EMPTY_LIST --- menu/drivers/xmb.c | 2 +- menu/menu_displaylist.c | 64 +++++++++++++++++------------------------ menu/menu_setting.h | 3 +- 3 files changed, 28 insertions(+), 41 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index bd51900547..9efa21dc45 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1271,8 +1271,8 @@ static void xmb_init_horizontal_list(xmb_handle_t *xmb) info.list = xmb->horizontal_list; info.menu_list = NULL; info.type = 0; + info.flags = 0; info.type_default = FILE_TYPE_PLAIN; - info.flags = SL_FLAG_ALLOW_EMPTY_LIST; info.enum_idx = MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST; strlcpy(info.label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST), diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index bf854b087d..3a8f7d4c6b 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3244,14 +3244,11 @@ static int menu_displaylist_parse_playlists_horizontal( if (list_size == 0) { - if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST)) - { - menu_entries_add_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), - msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), - MENU_ENUM_LABEL_NO_ITEMS, - MENU_SETTING_NO_ITEM, 0, 0); - } + menu_entries_add_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), + msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), + MENU_ENUM_LABEL_NO_ITEMS, + MENU_SETTING_NO_ITEM, 0, 0); string_list_free(str_list); @@ -3295,14 +3292,11 @@ static int menu_displaylist_parse_playlists_horizontal( if (items_found == 0) { - if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST)) - { - menu_entries_add_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), - msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), - MENU_ENUM_LABEL_NO_ITEMS, - MENU_SETTING_NO_ITEM, 0, 0); - } + menu_entries_add_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), + msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), + MENU_ENUM_LABEL_NO_ITEMS, + MENU_SETTING_NO_ITEM, 0, 0); } return 0; @@ -3387,22 +3381,19 @@ static int menu_displaylist_parse_generic( if (list_size == 0) { - if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST)) - { - menu_entries_add_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), - msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), - MENU_ENUM_LABEL_NO_ITEMS, - MENU_SETTING_NO_ITEM, 0, 0); + menu_entries_add_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), + msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), + MENU_ENUM_LABEL_NO_ITEMS, + MENU_SETTING_NO_ITEM, 0, 0); #ifdef HAVE_NETWORKING - if (type == DISPLAYLIST_CORES) - menu_entries_add_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); + if (type == DISPLAYLIST_CORES) + menu_entries_add_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); @@ -3534,14 +3525,11 @@ static int menu_displaylist_parse_generic( if (items_found == 0) { - if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST)) - { - menu_entries_add_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), - msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), - MENU_ENUM_LABEL_NO_ITEMS, - MENU_SETTING_NO_ITEM, 0, 0); - } + menu_entries_add_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS), + msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS), + MENU_ENUM_LABEL_NO_ITEMS, + MENU_SETTING_NO_ITEM, 0, 0); return 0; } diff --git a/menu/menu_setting.h b/menu/menu_setting.h index 6a7cd2ff8f..bdf84116bd 100644 --- a/menu/menu_setting.h +++ b/menu/menu_setting.h @@ -112,8 +112,7 @@ enum setting_list_flags SL_FLAG_SETTINGS_LOGGING_OPTIONS = (1 << 27), SL_FLAG_SETTINGS_SAVING_OPTIONS = (1 << 28), SL_FLAG_SETTINGS_SUB_ACCOUNTS_OPTIONS = (1 << 29), - SL_FLAG_SETTINGS_ALL = (1 << 30), - SL_FLAG_ALLOW_EMPTY_LIST = (1 << 31) + SL_FLAG_SETTINGS_ALL = (1 << 30) }; typedef struct rarch_setting_group_info rarch_setting_group_info_t;