mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(menu_driver.c) Cleanups
This commit is contained in:
parent
6d6a60c145
commit
9cae664955
@ -182,10 +182,13 @@ const menu_ctx_driver_t *menu_ctx_driver_get_ptr(void)
|
||||
return driver->menu_ctx;
|
||||
}
|
||||
|
||||
static void menu_driver_list_delete_common(file_list_t *list, size_t idx,
|
||||
size_t list_size)
|
||||
void menu_driver_list_delete(file_list_t *list, size_t idx, size_t list_size)
|
||||
{
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
||||
if (driver->list_delete)
|
||||
driver->list_delete(list, idx, list_size);
|
||||
|
||||
if (!list)
|
||||
return;
|
||||
@ -206,15 +209,6 @@ static void menu_driver_list_delete_common(file_list_t *list, size_t idx,
|
||||
list->list[idx].actiondata = NULL;
|
||||
}
|
||||
|
||||
void menu_driver_list_delete(file_list_t *list, size_t i, size_t list_size)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
||||
if (driver->list_delete)
|
||||
driver->list_delete(list, i, list_size);
|
||||
menu_driver_list_delete_common(list, i, list_size);
|
||||
}
|
||||
|
||||
void menu_driver_list_clear(file_list_t *list)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
@ -239,13 +233,17 @@ void menu_driver_list_set_selection(file_list_t *list)
|
||||
driver->list_set_selection(list);
|
||||
}
|
||||
|
||||
static void menu_driver_list_insert_common(file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t idx)
|
||||
void menu_driver_list_insert(file_list_t *list, const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
if (driver->list_insert)
|
||||
driver->list_insert(list, path, label, idx);
|
||||
|
||||
list->list[idx].actiondata = (menu_file_list_cbs_t*)
|
||||
calloc(1, sizeof(menu_file_list_cbs_t));
|
||||
|
||||
@ -258,17 +256,6 @@ static void menu_driver_list_insert_common(file_list_t *list,
|
||||
menu_entries_cbs_init(list, path, label, type, idx);
|
||||
}
|
||||
|
||||
void menu_driver_list_insert(file_list_t *list, const char *path,
|
||||
const char *label, unsigned type, size_t list_size)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
||||
if (driver->list_insert)
|
||||
driver->list_insert(list, path, label, list_size);
|
||||
|
||||
menu_driver_list_insert_common(list, path, label, type, list_size);
|
||||
}
|
||||
|
||||
void menu_driver_list_cache(bool state, unsigned action)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
Loading…
x
Reference in New Issue
Block a user