(Menu) Add MENU_FILE_CORE

This commit is contained in:
twinaphex 2014-09-04 03:40:48 +02:00
parent 2bec746d28
commit 13b85a3458
3 changed files with 10 additions and 16 deletions

View File

@ -400,22 +400,11 @@ static void rgui_render(void)
}
else
#endif
/* Pretty-print libretro cores from menu. */
if (!strcmp(label, "core_list") ||
!strcmp(label, "deferred_core_list"))
if (type == MENU_FILE_CORE)
{
if (type == MENU_FILE_PLAIN)
{
strlcpy(type_str, "(CORE)", sizeof(type_str));
file_list_get_alt_at_offset(driver.menu->selection_buf, i, &path);
w = 6;
}
else
{
strlcpy(type_str, "(DIR)", sizeof(type_str));
type = MENU_FILE_DIRECTORY;
w = 5;
}
strlcpy(type_str, "(CORE)", sizeof(type_str));
file_list_get_alt_at_offset(driver.menu->selection_buf, i, &path);
w = 6;
}
else if (type == MENU_FILE_PLAIN)
{

View File

@ -59,6 +59,7 @@ typedef enum
MENU_FILE_PLAIN = 1,
MENU_FILE_DIRECTORY,
MENU_FILE_DEVICE,
MENU_FILE_CORE,
MENU_FILE_PLAYLIST_ENTRY,
MENU_FILE_USE_DIRECTORY,
MENU_FILE_SWITCH,

View File

@ -279,7 +279,7 @@ int menu_entries_push_list(menu_handle_t *menu,
for (i = 0; i < list_size; i++)
{
file_list_push(list, info[i].path, "",
MENU_FILE_PLAIN, 0);
MENU_FILE_CORE, 0);
file_list_set_alt_at_offset(list, i,
info[i].display_name);
}
@ -760,6 +760,10 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list)
/* Push menu_type further down in the chain.
* Needed for shader manager currently. */
if (!strcmp(label, "core_list"))
file_list_push(list, path, "",
is_dir ? MENU_FILE_DIRECTORY : MENU_FILE_CORE, 0);
else
file_list_push(list, path, "",
is_dir ? MENU_FILE_DIRECTORY : MENU_FILE_PLAIN, 0);
}