Simplify menu_entry_get_setting

This commit is contained in:
twinaphex 2015-08-17 19:57:17 +02:00
parent a4657461a6
commit d36272b4bb

View File

@ -56,22 +56,13 @@ int menu_entry_go_back(void)
static rarch_setting_t *menu_entry_get_setting(uint32_t i) static rarch_setting_t *menu_entry_get_setting(uint32_t i)
{ {
const char *path = NULL;
const char *entry_label = NULL;
const char *dir = NULL;
const char *label = NULL;
menu_list_t *menu_list = menu_list_get_ptr(); menu_list_t *menu_list = menu_list_get_ptr();
unsigned type = 0; menu_file_list_cbs_t *cbs = menu_list_get_actiondata_at_offset
unsigned menu_type = 0; (menu_list->selection_buf,i);
menu_list_get_last_stack(menu_list, &dir, if (!cbs)
&label, &menu_type, NULL); return NULL;
return cbs->setting;
menu_list_get_at_offset(menu_list->selection_buf, i, &path,
&entry_label, &type, NULL);
return menu_setting_find(
menu_list->selection_buf->list[i].label);
} }
enum menu_entry_type menu_entry_get_type(uint32_t i) enum menu_entry_type menu_entry_get_type(uint32_t i)