Add DISPLAYLIST_CORES

This commit is contained in:
twinaphex 2015-05-12 11:06:04 +02:00
parent 9bec899fcb
commit 7177a17b67
3 changed files with 19 additions and 2 deletions

View File

@ -43,6 +43,11 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
ret = menu_entries_push_list(menu, info->list,
info->path, info->label, info->type, info->flags);
break;
case DISPLAYLIST_CORES:
ret = menu_entries_parse_list(info->list, info->menu_list,
info->path, info->label, info->type,
info->type_default, info->exts, NULL);
break;
}
return ret;

View File

@ -29,6 +29,7 @@ enum
DISPLAYLIST_NONE = 0,
DISPLAYLIST_MAIN_MENU,
DISPLAYLIST_SETTINGS,
DISPLAYLIST_CORES,
};
typedef struct menu_displaylist_info
@ -37,7 +38,9 @@ typedef struct menu_displaylist_info
file_list_t *menu_list;
char path[PATH_MAX_LENGTH];
char label[PATH_MAX_LENGTH];
char exts[PATH_MAX_LENGTH];
unsigned type;
unsigned type_default;
unsigned flags;
} menu_displaylist_info_t;

View File

@ -2120,8 +2120,17 @@ static int deferred_push_cursor_manager_list(void *data, void *userdata,
static int deferred_push_core_list(void *data, void *userdata,
const char *path, const char *label, unsigned type)
{
return menu_entries_parse_list((file_list_t*)data, (file_list_t*)userdata, path, label, type,
MENU_FILE_PLAIN, EXT_EXECUTABLES, NULL);
menu_displaylist_info_t info = {0};
info.list = (file_list_t*)data;
info.menu_list = (file_list_t*)userdata;
info.type = type;
info.type_default = MENU_FILE_PLAIN;
strlcpy(info.exts, EXT_EXECUTABLES, sizeof(info.exts));
strlcpy(info.path, path, sizeof(info.path));
strlcpy(info.label, label, sizeof(info.label));
return menu_displaylist_push_list(&info, DISPLAYLIST_CORES);
}
static int deferred_push_configurations(void *data, void *userdata,