Create RARCH_MENU_CTL_POPULATE_ENTRIES

This commit is contained in:
twinaphex 2015-12-11 14:34:47 +01:00
parent 9e9e6bd8b4
commit fa9f0a32e8
3 changed files with 15 additions and 8 deletions

View File

@ -3220,7 +3220,6 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
void menu_displaylist_push_list_process(menu_displaylist_info_t *info)
{
if (!info)
return;
@ -3232,12 +3231,7 @@ void menu_displaylist_push_list_process(menu_displaylist_info_t *info)
if (info->need_push)
{
const menu_ctx_driver_t *menu_driver = menu_ctx_driver_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
if (menu && menu_driver->populate_entries)
menu_driver->populate_entries(menu->userdata, info->path, info->label, info->type);
menu_driver_ctl(RARCH_MENU_CTL_POPULATE_ENTRIES, info);
ui_companion_driver_notify_list_loaded(info->list, info->menu_list);
}
}

View File

@ -824,6 +824,18 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
ptr_out);
}
break;
case RARCH_MENU_CTL_POPULATE_ENTRIES:
{
menu_displaylist_info_t *info = (menu_displaylist_info_t*)data;
if (!info)
return false;
if (driver->populate_entries)
driver->populate_entries(
menu_driver_data ? menu_driver_data->userdata : NULL,
info->path, info->label, info->type);
}
return true;
default:
case RARCH_MENU_CTL_NONE:
break;

View File

@ -123,7 +123,8 @@ enum rarch_menu_ctl_state
RARCH_MENU_CTL_SYSTEM_INFO_GET,
RARCH_MENU_CTL_PLAYLIST_FREE,
RARCH_MENU_CTL_PLAYLIST_INIT,
RARCH_MENU_CTL_PLAYLIST_GET
RARCH_MENU_CTL_PLAYLIST_GET,
RARCH_MENU_CTL_POPULATE_ENTRIES
};
typedef enum