mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(menu_driver) Prevent spurious navigation events when invoking MENU_NAVIGATION_CTL_CLEAR
This commit is contained in:
parent
385b8de194
commit
77c2ceeff4
@ -2573,13 +2573,21 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
|||||||
{
|
{
|
||||||
bool *pending_push = (bool*)data;
|
bool *pending_push = (bool*)data;
|
||||||
|
|
||||||
|
/* Always set current selection to first entry */
|
||||||
menu_navigation_set_selection(0);
|
menu_navigation_set_selection(0);
|
||||||
menu_driver_navigation_set(true);
|
|
||||||
|
|
||||||
if (pending_push)
|
/* menu_driver_navigation_set() will be called
|
||||||
|
* at the next 'push'.
|
||||||
|
* If a push is *not* pending, have to do it here
|
||||||
|
* instead */
|
||||||
|
if (!(*pending_push))
|
||||||
|
{
|
||||||
|
menu_driver_navigation_set(true);
|
||||||
|
|
||||||
if (menu_driver_ctx->navigation_clear)
|
if (menu_driver_ctx->navigation_clear)
|
||||||
menu_driver_ctx->navigation_clear(
|
menu_driver_ctx->navigation_clear(
|
||||||
menu_userdata, *pending_push);
|
menu_userdata, *pending_push);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MENU_NAVIGATION_CTL_INCREMENT:
|
case MENU_NAVIGATION_CTL_INCREMENT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user