Create RARCH_MENU_CTL_SET_TEXTURE

This commit is contained in:
twinaphex 2015-12-06 18:30:45 +01:00
parent 99ea0095a3
commit 8829b27cd2
3 changed files with 6 additions and 11 deletions

View File

@ -365,7 +365,7 @@ int menu_iterate_render(void)
if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) && !runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
menu_display_ctl(MENU_DISPLAY_CTL_LIBRETRO, NULL);
menu_driver_set_texture();
menu_driver_ctl(RARCH_MENU_CTL_SET_TEXTURE, NULL);
menu->state = 0;

View File

@ -228,14 +228,6 @@ void *menu_driver_list_get_entry(menu_list_type_t type, unsigned i)
return NULL;
}
void menu_driver_set_texture(void)
{
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
if (driver->set_texture)
driver->set_texture();
}
void menu_driver_context_reset(void)
{
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
@ -674,6 +666,10 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
case RARCH_MENU_CTL_UNSET_OWN_DRIVER:
menu_driver_data_own = false;
break;
case RARCH_MENU_CTL_SET_TEXTURE:
if (driver->set_texture)
driver->set_texture();
break;
case RARCH_MENU_CTL_IS_SET_TEXTURE:
if (!menu_driver_ctx)
return false;

View File

@ -96,6 +96,7 @@ enum rarch_menu_ctl_state
RARCH_MENU_CTL_NONE = 0,
RARCH_MENU_CTL_DEINIT,
RARCH_MENU_CTL_FRAME,
RARCH_MENU_CTL_SET_TEXTURE,
RARCH_MENU_CTL_SET_TOGGLE,
RARCH_MENU_CTL_UNSET_TOGGLE,
RARCH_MENU_CTL_SET_ALIVE,
@ -335,8 +336,6 @@ void init_menu(void);
menu_handle_t *menu_driver_get_ptr(void);
void menu_driver_set_texture(void);
void menu_driver_context_reset(void);
void menu_driver_free(menu_handle_t *menu);