Merge pull request #8797 from jdgleaver/menu-nav-fix

(menu_driver) Prevent spurious navigation events when invoking MENU_NAVIGATION_CTL_CLEAR
This commit is contained in:
Twinaphex 2019-05-17 14:37:21 +02:00 committed by GitHub
commit 542f761daf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2573,13 +2573,21 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
{
bool *pending_push = (bool*)data;
/* Always set current selection to first entry */
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)
menu_driver_ctx->navigation_clear(
menu_userdata, *pending_push);
}
}
break;
case MENU_NAVIGATION_CTL_INCREMENT: