Remove some RARCH_MENU_CTL_ actions

This commit is contained in:
twinaphex 2017-05-15 08:03:35 +02:00
parent f584d1cea5
commit 076a83a62b
2 changed files with 4 additions and 19 deletions

View File

@ -247,7 +247,8 @@ static void menu_driver_toggle(bool on)
if (!on)
menu_display_toggle_set_reason(MENU_TOGGLE_REASON_NONE);
menu_driver_ctl(RARCH_MENU_CTL_TOGGLE, &on);
if (menu_driver_ctx && menu_driver_ctx->toggle)
menu_driver_ctx->toggle(menu_userdata, on);
if (on)
menu_driver_alive = true;
@ -652,7 +653,8 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
case RARCH_MENU_CTL_OWNS_DRIVER:
return menu_driver_data_own;
case RARCH_MENU_CTL_DEINIT:
menu_driver_ctl(RARCH_MENU_CTL_CONTEXT_DESTROY, NULL);
if (menu_driver_ctx && menu_driver_ctx->context_destroy)
menu_driver_ctx->context_destroy(menu_userdata);
if (menu_driver_ctl(RARCH_MENU_CTL_OWNS_DRIVER, NULL))
return true;
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
@ -800,16 +802,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
return true;
}
return false;
case RARCH_MENU_CTL_TOGGLE:
{
bool *on = (bool*)data;
if (!on)
return false;
if (menu_driver_ctx && menu_driver_ctx->toggle)
menu_driver_ctx->toggle(menu_userdata, *on);
}
break;
case RARCH_MENU_CTL_REFRESH:
{
#if 0
@ -821,11 +813,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
#endif
}
break;
case RARCH_MENU_CTL_CONTEXT_DESTROY:
if (!menu_driver_ctx || !menu_driver_ctx->context_destroy)
return false;
menu_driver_ctx->context_destroy(menu_userdata);
break;
case RARCH_MENU_CTL_LIST_SET_SELECTION:
{
file_list_t *list = (file_list_t*)data;

View File

@ -109,8 +109,6 @@ enum rarch_menu_ctl_state
RARCH_MENU_CTL_PLAYLIST_FREE,
RARCH_MENU_CTL_PLAYLIST_INIT,
RARCH_MENU_CTL_PLAYLIST_GET,
RARCH_MENU_CTL_TOGGLE,
RARCH_MENU_CTL_CONTEXT_DESTROY,
RARCH_MENU_CTL_FIND_DRIVER,
RARCH_MENU_CTL_LOAD_IMAGE,
RARCH_MENU_CTL_LIST_FREE,