mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Cleanup
This commit is contained in:
parent
65c59eb9f1
commit
4202e9e9d3
@ -329,10 +329,10 @@ end:
|
|||||||
return 0;
|
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();
|
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)
|
if (!menu)
|
||||||
return -1;
|
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 (BIT64_GET(menu->state, MENU_STATE_RENDER_MESSAGEBOX) && menu->menu_state.msg[0] != '\0')
|
||||||
{
|
{
|
||||||
if (driver->render_messagebox)
|
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())
|
if (ui_companion_is_on_foreground())
|
||||||
{
|
{
|
||||||
@ -360,7 +360,7 @@ int menu_iterate_render(void)
|
|||||||
{
|
{
|
||||||
menu_animation_ctl(MENU_ANIMATION_CTL_UPDATE_TIME, NULL);
|
menu_animation_ctl(MENU_ANIMATION_CTL_UPDATE_TIME, NULL);
|
||||||
if (driver->render)
|
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))
|
if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) && !runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||||
|
@ -452,7 +452,7 @@ bool menu_load_content(enum rarch_core_type type)
|
|||||||
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
||||||
/* redraw menu frame */
|
/* redraw menu frame */
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_MSG_FORCE, &msg_force);
|
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)))
|
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_data_own = false;
|
||||||
menu_driver_ctx = NULL;
|
menu_driver_ctx = NULL;
|
||||||
break;
|
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:
|
case RARCH_MENU_CTL_FRAME:
|
||||||
if (!menu_driver_alive)
|
if (!menu_driver_alive)
|
||||||
return false;
|
return false;
|
||||||
|
@ -93,6 +93,7 @@ enum rarch_menu_ctl_state
|
|||||||
{
|
{
|
||||||
RARCH_MENU_CTL_NONE = 0,
|
RARCH_MENU_CTL_NONE = 0,
|
||||||
RARCH_MENU_CTL_DEINIT,
|
RARCH_MENU_CTL_DEINIT,
|
||||||
|
RARCH_MENU_CTL_RENDER,
|
||||||
RARCH_MENU_CTL_FRAME,
|
RARCH_MENU_CTL_FRAME,
|
||||||
RARCH_MENU_CTL_SET_PREVENT_POPULATE,
|
RARCH_MENU_CTL_SET_PREVENT_POPULATE,
|
||||||
RARCH_MENU_CTL_UNSET_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(bool render_this_frame, enum menu_action action);
|
||||||
|
|
||||||
int menu_iterate_render(void);
|
int menu_iterate_render(void *data, void *userdata);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* menu_free:
|
* menu_free:
|
||||||
|
@ -1286,7 +1286,7 @@ int runloop_iterate(unsigned *sleep_ms)
|
|||||||
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
||||||
|
|
||||||
if (focused || !is_idle)
|
if (focused || !is_idle)
|
||||||
menu_iterate_render();
|
menu_driver_ctl(RARCH_MENU_CTL_RENDER, NULL);
|
||||||
|
|
||||||
if (!focused || is_idle)
|
if (!focused || is_idle)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user