From ef808b6591c9be542ddfcf072ac8b7c695cd60af Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 15 Jun 2016 01:44:30 +0200 Subject: [PATCH] Add DISPLAYLIST_SETTING_ENUM --- menu/menu_displaylist.c | 13 +++++++++++++ menu/menu_displaylist.h | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 80a36852ab..db64315547 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3533,6 +3533,19 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) } return true; + case DISPLAYLIST_SETTING_ENUM: + { + menu_displaylist_ctx_parse_entry_t *entry = + (menu_displaylist_ctx_parse_entry_t*)data; + + if (menu_displaylist_parse_settings_enum(entry->data, + entry->info, + entry->enum_idx, + entry->parse_type, + entry->add_empty_entry) == -1) + goto error; + } + return true; case DISPLAYLIST_SETTINGS: ret = menu_displaylist_parse_settings(menu, info, info->label, PARSE_NONE, true); diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 4fac743eae..a67b81730d 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -22,6 +22,8 @@ #include #include +#include "menu_hash.h" + #ifndef COLLECTION_SIZE #define COLLECTION_SIZE 99999 #endif @@ -51,6 +53,7 @@ enum menu_displaylist_ctl_state DISPLAYLIST_MAIN_MENU, DISPLAYLIST_GENERIC, DISPLAYLIST_SETTING, + DISPLAYLIST_SETTING_ENUM, DISPLAYLIST_SETTINGS, DISPLAYLIST_SETTINGS_ALL, DISPLAYLIST_HORIZONTAL, @@ -146,6 +149,7 @@ typedef struct menu_displaylist_ctx_parse_entry void *data; menu_displaylist_info_t *info; const char *info_label; + enum menu_hash_enums enum_idx; enum menu_displaylist_parse_type parse_type; bool add_empty_entry; } menu_displaylist_ctx_parse_entry_t;