This commit is contained in:
twinaphex 2015-12-10 19:43:25 +01:00
parent 65c59eb9f1
commit 4202e9e9d3
4 changed files with 12 additions and 7 deletions

View File

@ -329,10 +329,10 @@ end:
return 0;
}
int menu_iterate_render(void)
int menu_iterate_render(void *data, void *userdata)
{
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
menu_handle_t *menu = (menu_handle_t*)data;
if (!menu)
return -1;
@ -346,7 +346,7 @@ int menu_iterate_render(void)
if (BIT64_GET(menu->state, MENU_STATE_RENDER_MESSAGEBOX) && menu->menu_state.msg[0] != '\0')
{
if (driver->render_messagebox)
driver->render_messagebox(menu->userdata, menu->menu_state.msg);
driver->render_messagebox(userdata, menu->menu_state.msg);
if (ui_companion_is_on_foreground())
{
@ -360,7 +360,7 @@ int menu_iterate_render(void)
{
menu_animation_ctl(MENU_ANIMATION_CTL_UPDATE_TIME, NULL);
if (driver->render)
driver->render(menu->userdata);
driver->render(userdata);
}
if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) && !runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))

View File

@ -452,7 +452,7 @@ bool menu_load_content(enum rarch_core_type type)
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
/* redraw menu frame */
menu_display_ctl(MENU_DISPLAY_CTL_SET_MSG_FORCE, &msg_force);
menu_iterate_render();
menu_driver_ctl(RARCH_MENU_CTL_RENDER, NULL);
if (!(main_load_content(0, NULL, NULL, menu_environment_get)))
{
@ -660,6 +660,10 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
menu_driver_data_own = false;
menu_driver_ctx = NULL;
break;
case RARCH_MENU_CTL_RENDER:
menu_iterate_render(menu_driver_data,
menu_driver_data ? menu_driver_data->userdata : NULL);
break;
case RARCH_MENU_CTL_FRAME:
if (!menu_driver_alive)
return false;

View File

@ -93,6 +93,7 @@ enum rarch_menu_ctl_state
{
RARCH_MENU_CTL_NONE = 0,
RARCH_MENU_CTL_DEINIT,
RARCH_MENU_CTL_RENDER,
RARCH_MENU_CTL_FRAME,
RARCH_MENU_CTL_SET_PREVENT_POPULATE,
RARCH_MENU_CTL_UNSET_PREVENT_POPULATE,
@ -402,7 +403,7 @@ void *menu_init(const void *data);
**/
int menu_iterate(bool render_this_frame, enum menu_action action);
int menu_iterate_render(void);
int menu_iterate_render(void *data, void *userdata);
/**
* menu_free:

View File

@ -1286,7 +1286,7 @@ int runloop_iterate(unsigned *sleep_ms)
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
if (focused || !is_idle)
menu_iterate_render();
menu_driver_ctl(RARCH_MENU_CTL_RENDER, NULL);
if (!focused || is_idle)
{