From bca0789d352ed761245f6c0279844fd6014cc041 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 14 Jul 2015 03:21:00 +0200 Subject: [PATCH] (GLUI) Seems to take care of glitch that would sometimes happen when trying to 'wrap' from the last entry to the first --- menu/menu_navigation.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/menu/menu_navigation.c b/menu/menu_navigation.c index 973066a706..48da6516be 100644 --- a/menu/menu_navigation.c +++ b/menu/menu_navigation.c @@ -94,8 +94,11 @@ void menu_navigation_increment(menu_navigation_t *nav, unsigned scroll_speed) return; if (nav->selection_ptr + scroll_speed < (menu_list_get_size(menu_list))) + { menu_navigation_set(nav, nav->selection_ptr + scroll_speed, true); + menu_driver_navigation_increment(); + } else { if (settings->menu.navigation.wraparound.vertical_enable) @@ -103,11 +106,13 @@ void menu_navigation_increment(menu_navigation_t *nav, unsigned scroll_speed) else { if ((menu_list_get_size(menu_list) > 0)) + { menu_navigation_set_last(nav); + menu_driver_navigation_increment(); + } } } - menu_driver_navigation_increment(); } /**