mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Create menu_driver_list_insert
This commit is contained in:
parent
5d1fff541b
commit
60d537fa32
@ -1969,6 +1969,17 @@ bool menu_driver_list_clear(file_list_t *list)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool menu_driver_list_insert(menu_ctx_list_t *list)
|
||||
{
|
||||
if (!list || !menu_driver_ctx || !menu_driver_ctx->list_insert)
|
||||
return false;
|
||||
menu_driver_ctx->list_insert(menu_userdata,
|
||||
list->list, list->path, list->fullpath,
|
||||
list->label, list->idx, list->entry_type);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool menu_driver_list_set_selection(file_list_t *list)
|
||||
{
|
||||
if (!list)
|
||||
@ -2275,16 +2286,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RARCH_MENU_CTL_LIST_INSERT:
|
||||
{
|
||||
menu_ctx_list_t *list = (menu_ctx_list_t*)data;
|
||||
if (!list || !menu_driver_ctx || !menu_driver_ctx->list_insert)
|
||||
return false;
|
||||
menu_driver_ctx->list_insert(menu_userdata,
|
||||
list->list, list->path, list->fullpath,
|
||||
list->label, list->idx, list->entry_type);
|
||||
}
|
||||
break;
|
||||
case RARCH_MENU_CTL_ENVIRONMENT:
|
||||
{
|
||||
menu_ctx_environment_t *menu_environ =
|
||||
|
@ -102,7 +102,6 @@ enum rarch_menu_ctl_state
|
||||
RARCH_MENU_CTL_OWNS_DRIVER,
|
||||
RARCH_MENU_CTL_FIND_DRIVER,
|
||||
RARCH_MENU_CTL_LIST_FREE,
|
||||
RARCH_MENU_CTL_LIST_INSERT,
|
||||
RARCH_MENU_CTL_ENVIRONMENT,
|
||||
RARCH_MENU_CTL_DRIVER_DATA_GET,
|
||||
RARCH_MENU_CTL_POINTER_TAP,
|
||||
@ -666,6 +665,8 @@ void menu_driver_set_thumbnail_system(char *s, size_t len);
|
||||
|
||||
void menu_driver_set_thumbnail_content(char *s, size_t len);
|
||||
|
||||
bool menu_driver_list_insert(menu_ctx_list_t *list);
|
||||
|
||||
bool menu_driver_list_set_selection(file_list_t *list);
|
||||
|
||||
bool menu_driver_list_get_selection(menu_ctx_list_t *list);
|
||||
|
@ -527,7 +527,7 @@ void menu_entries_append(file_list_t *list, const char *path, const char *label,
|
||||
list_info.idx = idx;
|
||||
list_info.entry_type = type;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_INSERT, &list_info);
|
||||
menu_driver_list_insert(&list_info);
|
||||
|
||||
if (list_info.fullpath)
|
||||
free(list_info.fullpath);
|
||||
@ -575,7 +575,7 @@ void menu_entries_append_enum(file_list_t *list, const char *path,
|
||||
list_info.idx = idx;
|
||||
list_info.entry_type = type;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_INSERT, &list_info);
|
||||
menu_driver_list_insert(&list_info);
|
||||
|
||||
if (list_info.fullpath)
|
||||
free(list_info.fullpath);
|
||||
@ -627,7 +627,7 @@ void menu_entries_prepend(file_list_t *list, const char *path, const char *label
|
||||
list_info.idx = idx;
|
||||
list_info.entry_type = type;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_INSERT, &list_info);
|
||||
menu_driver_list_insert(&list_info);
|
||||
|
||||
if (list_info.fullpath)
|
||||
free(list_info.fullpath);
|
||||
|
Loading…
x
Reference in New Issue
Block a user