mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-09 12:30:41 +00:00
Implement Navigation Wrap-Around Vertical
This commit is contained in:
parent
30b8fd3ac3
commit
d080c74464
@ -1196,11 +1196,9 @@ static int action_toggle_scroll(unsigned type, const char *label,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
scroll_speed = (max(driver.menu->scroll_accel, 2) - 2) / 4 + 1;
|
scroll_speed = (max(driver.menu->scroll_accel, 2) - 2) / 4 + 1;
|
||||||
fast_scroll_speed = 4 + 4 * scroll_speed;
|
fast_scroll_speed = 4 + 4 * scroll_speed;
|
||||||
|
|
||||||
(void)scroll_speed;
|
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case MENU_ACTION_LEFT:
|
case MENU_ACTION_LEFT:
|
||||||
@ -2582,15 +2580,27 @@ static int action_bind_up_or_down_generic(unsigned type, const char *label,
|
|||||||
menu_navigation_set(driver.menu,
|
menu_navigation_set(driver.menu,
|
||||||
driver.menu->selection_ptr - scroll_speed, true);
|
driver.menu->selection_ptr - scroll_speed, true);
|
||||||
else
|
else
|
||||||
menu_navigation_set(driver.menu,
|
{
|
||||||
menu_list_get_size(driver.menu->menu_list) - 1, true);
|
if (g_settings.menu.navigation.wraparound.vertical_enable)
|
||||||
|
menu_navigation_set(driver.menu,
|
||||||
|
menu_list_get_size(driver.menu->menu_list) - 1, true);
|
||||||
|
else
|
||||||
|
menu_navigation_set(driver.menu,
|
||||||
|
0, true);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MENU_ACTION_DOWN:
|
case MENU_ACTION_DOWN:
|
||||||
if (driver.menu->selection_ptr + scroll_speed < (menu_list_get_size(driver.menu->menu_list)))
|
if (driver.menu->selection_ptr + scroll_speed < (menu_list_get_size(driver.menu->menu_list)))
|
||||||
menu_navigation_set(driver.menu,
|
menu_navigation_set(driver.menu,
|
||||||
driver.menu->selection_ptr + scroll_speed, true);
|
driver.menu->selection_ptr + scroll_speed, true);
|
||||||
else
|
else
|
||||||
menu_navigation_clear(driver.menu, false);
|
{
|
||||||
|
if (g_settings.menu.navigation.wraparound.vertical_enable)
|
||||||
|
menu_navigation_clear(driver.menu, false);
|
||||||
|
else
|
||||||
|
menu_navigation_set(driver.menu,
|
||||||
|
menu_list_get_size(driver.menu->menu_list) - 1, true);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user