diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 62df33b648..03c7ce9021 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -436,6 +436,16 @@ bool menu_driver_iterate(menu_ctx_iterate_t *iterate) 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) { switch (state) @@ -777,15 +787,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) return true; } 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: { bool *on = (bool*)data; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 49819b5c69..bda200a8e8 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -120,7 +120,6 @@ enum rarch_menu_ctl_state RARCH_MENU_CTL_FIND_DRIVER, RARCH_MENU_CTL_LOAD_IMAGE, RARCH_MENU_CTL_LIST_FREE, - RARCH_MENU_CTL_LIST_CLEAR, RARCH_MENU_CTL_LIST_SET_SELECTION, RARCH_MENU_CTL_LIST_GET_SELECTION, 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_list_clear(void *data); + extern menu_ctx_driver_t menu_ctx_xui; extern menu_ctx_driver_t menu_ctx_rgui; extern menu_ctx_driver_t menu_ctx_mui; diff --git a/menu/menu_entries.c b/menu/menu_entries.c index fb5605d8ba..82b7d172e2 100644 --- a/menu/menu_entries.c +++ b/menu/menu_entries.c @@ -68,7 +68,7 @@ static bool menu_entries_clear(file_list_t *list) if (!list) return false; - menu_driver_ctl(RARCH_MENU_CTL_LIST_CLEAR, list); + menu_driver_list_clear(list); for (i = 0; i < list->size; i++) file_list_free_actiondata(list, i);