From b510b2fe269af6440e55323803b3019bd8c40b7c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 18 Jun 2016 22:45:32 +0200 Subject: [PATCH] Add menu_setting_get_enum_idx --- menu/menu_setting.c | 7 +++++++ menu/menu_setting.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 2b57127a40..93e6077ae8 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -2279,6 +2279,13 @@ const char *menu_setting_get_values(rarch_setting_t *setting) return setting->values; } +enum menu_hash_enums menu_setting_get_enum_idx(rarch_setting_t *setting) +{ + if (!setting) + return MENU_ENUM_LABEL_UNKNOWN; + return setting->enum_idx; +} + const char *menu_setting_get_name(rarch_setting_t *setting) { if (!setting) diff --git a/menu/menu_setting.h b/menu/menu_setting.h index 2cdbc4ecee..4f0205d28a 100644 --- a/menu/menu_setting.h +++ b/menu/menu_setting.h @@ -340,6 +340,8 @@ enum setting_type menu_setting_get_type(rarch_setting_t *setting); enum setting_type menu_setting_get_browser_selection_type(rarch_setting_t *setting); +enum menu_hash_enums menu_setting_get_enum_idx(rarch_setting_t *setting); + const char *menu_setting_get_values(rarch_setting_t *setting); const char *menu_setting_get_name(rarch_setting_t *setting);