mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Create menu_driver_context_reset
This commit is contained in:
parent
03145a0424
commit
6f0df4cf60
3 changed files with 11 additions and 7 deletions
2
driver.c
2
driver.c
|
@ -355,7 +355,7 @@ void drivers_init(int flags)
|
|||
if (flags & DRIVER_MENU_MASK)
|
||||
{
|
||||
menu_driver_ctl(RARCH_MENU_CTL_INIT, NULL);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_CONTEXT_RESET, NULL);
|
||||
menu_driver_context_reset(video_is_threaded);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -458,6 +458,14 @@ void menu_driver_decrement_navigation(void)
|
|||
menu_driver_ctx->navigation_decrement(menu_userdata);
|
||||
}
|
||||
|
||||
bool menu_driver_context_reset(bool is_threaded)
|
||||
{
|
||||
if (!menu_driver_ctx || !menu_driver_ctx->context_reset)
|
||||
return false;
|
||||
menu_driver_ctx->context_reset(menu_userdata);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
|
@ -812,11 +820,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
|||
#endif
|
||||
}
|
||||
break;
|
||||
case RARCH_MENU_CTL_CONTEXT_RESET:
|
||||
if (!menu_driver_ctx || !menu_driver_ctx->context_reset)
|
||||
return false;
|
||||
menu_driver_ctx->context_reset(menu_userdata);
|
||||
break;
|
||||
case RARCH_MENU_CTL_CONTEXT_DESTROY:
|
||||
if (!menu_driver_ctx || !menu_driver_ctx->context_destroy)
|
||||
return false;
|
||||
|
|
|
@ -112,7 +112,6 @@ enum rarch_menu_ctl_state
|
|||
RARCH_MENU_CTL_PLAYLIST_INIT,
|
||||
RARCH_MENU_CTL_PLAYLIST_GET,
|
||||
RARCH_MENU_CTL_TOGGLE,
|
||||
RARCH_MENU_CTL_CONTEXT_RESET,
|
||||
RARCH_MENU_CTL_CONTEXT_DESTROY,
|
||||
RARCH_MENU_CTL_POPULATE_ENTRIES,
|
||||
RARCH_MENU_CTL_FIND_DRIVER,
|
||||
|
@ -401,6 +400,8 @@ bool menu_driver_list_clear(void *data);
|
|||
|
||||
void menu_driver_increment_navigation(void);
|
||||
|
||||
bool menu_driver_context_reset(bool is_threaded);
|
||||
|
||||
void menu_driver_decrement_navigation(void);
|
||||
|
||||
extern menu_ctx_driver_t menu_ctx_xui;
|
||||
|
|
Loading…
Add table
Reference in a new issue