mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Create menu_driver_toggle
This commit is contained in:
parent
b8a9800743
commit
67c8c3a5e7
@ -287,3 +287,13 @@ void menu_driver_render(void)
|
|||||||
if (driver->menu_ctx && driver->menu_ctx->render)
|
if (driver->menu_ctx && driver->menu_ctx->render)
|
||||||
driver->menu_ctx->render();
|
driver->menu_ctx->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void menu_driver_toggle(bool latch)
|
||||||
|
{
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
if (!driver)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (driver->menu_ctx && driver->menu_ctx->toggle)
|
||||||
|
driver->menu_ctx->toggle(latch);
|
||||||
|
}
|
||||||
|
@ -310,6 +310,8 @@ void menu_driver_free(menu_handle_t *menu);
|
|||||||
|
|
||||||
void menu_driver_render(void);
|
void menu_driver_render(void);
|
||||||
|
|
||||||
|
void menu_driver_toggle(bool latch);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2055,8 +2055,7 @@ void rarch_main_set_state(unsigned cmd)
|
|||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (driver->menu_ctx && driver->menu_ctx->toggle)
|
menu_driver_toggle(true);
|
||||||
driver->menu_ctx->toggle(true);
|
|
||||||
|
|
||||||
/* Menu should always run with vsync on. */
|
/* Menu should always run with vsync on. */
|
||||||
rarch_main_command(RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
rarch_main_command(RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||||
@ -2091,8 +2090,7 @@ void rarch_main_set_state(unsigned cmd)
|
|||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_apply_deferred_settings();
|
menu_apply_deferred_settings();
|
||||||
|
|
||||||
if (driver->menu_ctx && driver->menu_ctx->toggle)
|
menu_driver_toggle(false);
|
||||||
driver->menu_ctx->toggle(false);
|
|
||||||
|
|
||||||
runloop->is_menu = false;
|
runloop->is_menu = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user