mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Create menu_driver_list_clear
This commit is contained in:
parent
467070f6a6
commit
e0483f73bc
@ -436,6 +436,16 @@ bool menu_driver_iterate(menu_ctx_iterate_t *iterate)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool menu_driver_list_clear(void *data)
|
||||||
|
{
|
||||||
|
file_list_t *list = (file_list_t*)data;
|
||||||
|
if (!list)
|
||||||
|
return false;
|
||||||
|
if (menu_driver_ctx->list_clear)
|
||||||
|
menu_driver_ctx->list_clear(list);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
@ -777,15 +787,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case RARCH_MENU_CTL_LIST_CLEAR:
|
|
||||||
{
|
|
||||||
file_list_t *list = (file_list_t*)data;
|
|
||||||
if (!list)
|
|
||||||
return false;
|
|
||||||
if (menu_driver_ctx->list_clear)
|
|
||||||
menu_driver_ctx->list_clear(list);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case RARCH_MENU_CTL_TOGGLE:
|
case RARCH_MENU_CTL_TOGGLE:
|
||||||
{
|
{
|
||||||
bool *on = (bool*)data;
|
bool *on = (bool*)data;
|
||||||
|
@ -120,7 +120,6 @@ enum rarch_menu_ctl_state
|
|||||||
RARCH_MENU_CTL_FIND_DRIVER,
|
RARCH_MENU_CTL_FIND_DRIVER,
|
||||||
RARCH_MENU_CTL_LOAD_IMAGE,
|
RARCH_MENU_CTL_LOAD_IMAGE,
|
||||||
RARCH_MENU_CTL_LIST_FREE,
|
RARCH_MENU_CTL_LIST_FREE,
|
||||||
RARCH_MENU_CTL_LIST_CLEAR,
|
|
||||||
RARCH_MENU_CTL_LIST_SET_SELECTION,
|
RARCH_MENU_CTL_LIST_SET_SELECTION,
|
||||||
RARCH_MENU_CTL_LIST_GET_SELECTION,
|
RARCH_MENU_CTL_LIST_GET_SELECTION,
|
||||||
RARCH_MENU_CTL_LIST_GET_SIZE,
|
RARCH_MENU_CTL_LIST_GET_SIZE,
|
||||||
@ -400,6 +399,8 @@ bool menu_driver_is_alive(void);
|
|||||||
|
|
||||||
bool menu_driver_iterate(menu_ctx_iterate_t *iterate);
|
bool menu_driver_iterate(menu_ctx_iterate_t *iterate);
|
||||||
|
|
||||||
|
bool menu_driver_list_clear(void *data);
|
||||||
|
|
||||||
extern menu_ctx_driver_t menu_ctx_xui;
|
extern menu_ctx_driver_t menu_ctx_xui;
|
||||||
extern menu_ctx_driver_t menu_ctx_rgui;
|
extern menu_ctx_driver_t menu_ctx_rgui;
|
||||||
extern menu_ctx_driver_t menu_ctx_mui;
|
extern menu_ctx_driver_t menu_ctx_mui;
|
||||||
|
@ -68,7 +68,7 @@ static bool menu_entries_clear(file_list_t *list)
|
|||||||
if (!list)
|
if (!list)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_CLEAR, list);
|
menu_driver_list_clear(list);
|
||||||
|
|
||||||
for (i = 0; i < list->size; i++)
|
for (i = 0; i < list->size; i++)
|
||||||
file_list_free_actiondata(list, i);
|
file_list_free_actiondata(list, i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user