mirror of
https://github.com/libretro/RetroArch
synced 2025-01-17 19:14:56 +00:00
Create menu_driver_{decrement|increment}_navigation
This commit is contained in:
parent
e0483f73bc
commit
c38f86e14a
@ -446,6 +446,18 @@ bool menu_driver_list_clear(void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
void menu_driver_increment_navigation(void)
|
||||
{
|
||||
if (menu_driver_ctx->navigation_increment)
|
||||
menu_driver_ctx->navigation_increment(menu_userdata);
|
||||
}
|
||||
|
||||
void menu_driver_decrement_navigation(void)
|
||||
{
|
||||
if (menu_driver_ctx->navigation_decrement)
|
||||
menu_driver_ctx->navigation_decrement(menu_userdata);
|
||||
}
|
||||
|
||||
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
@ -655,14 +667,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
case RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT:
|
||||
menu_driver_load_no_content = false;
|
||||
break;
|
||||
case RARCH_MENU_CTL_NAVIGATION_INCREMENT:
|
||||
if (menu_driver_ctx->navigation_increment)
|
||||
menu_driver_ctx->navigation_increment(menu_userdata);
|
||||
break;
|
||||
case RARCH_MENU_CTL_NAVIGATION_DECREMENT:
|
||||
if (menu_driver_ctx->navigation_decrement)
|
||||
menu_driver_ctx->navigation_decrement(menu_userdata);
|
||||
break;
|
||||
case RARCH_MENU_CTL_NAVIGATION_SET:
|
||||
{
|
||||
bool *scroll = (bool*)data;
|
||||
|
@ -82,8 +82,6 @@ enum rarch_menu_ctl_state
|
||||
{
|
||||
RARCH_MENU_CTL_NONE = 0,
|
||||
RARCH_MENU_CTL_REFRESH,
|
||||
RARCH_MENU_CTL_NAVIGATION_INCREMENT,
|
||||
RARCH_MENU_CTL_NAVIGATION_DECREMENT,
|
||||
RARCH_MENU_CTL_NAVIGATION_SET,
|
||||
RARCH_MENU_CTL_NAVIGATION_CLEAR,
|
||||
RARCH_MENU_CTL_NAVIGATION_SET_LAST,
|
||||
@ -401,6 +399,10 @@ bool menu_driver_iterate(menu_ctx_iterate_t *iterate);
|
||||
|
||||
bool menu_driver_list_clear(void *data);
|
||||
|
||||
void menu_driver_increment_navigation(void);
|
||||
|
||||
void menu_driver_decrement_navigation(void);
|
||||
|
||||
extern menu_ctx_driver_t menu_ctx_xui;
|
||||
extern menu_ctx_driver_t menu_ctx_rgui;
|
||||
extern menu_ctx_driver_t menu_ctx_mui;
|
||||
|
@ -104,7 +104,7 @@ bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data)
|
||||
}
|
||||
}
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_NAVIGATION_INCREMENT, NULL);
|
||||
menu_driver_increment_navigation();
|
||||
}
|
||||
break;
|
||||
case MENU_NAVIGATION_CTL_DECREMENT:
|
||||
@ -134,7 +134,8 @@ bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data)
|
||||
menu_navigation_set_selection(idx);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET, &scroll);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_DECREMENT, NULL);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_NAVIGATION_DECREMENT, NULL);
|
||||
|
||||
menu_driver_decrement_navigation();
|
||||
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user