mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
(xmb) Set selection_ptr_old to zero when animations are off
This commit is contained in:
parent
942ea38248
commit
6ed9f28656
@ -3999,12 +3999,6 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
|
||||
if (!xmb)
|
||||
return;
|
||||
|
||||
/* FIXME: this shouldn't be happening at all */
|
||||
if (selection >= selection_buf->size)
|
||||
selection = selection_buf->size ? selection_buf->size - 1 : 0;
|
||||
|
||||
xmb->selection_ptr_old = selection;
|
||||
|
||||
/* Check whether to enable the horizontal animation. */
|
||||
if (settings->bools.menu_horizontal_animation)
|
||||
{
|
||||
@ -4012,6 +4006,12 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
|
||||
unsigned height = 0;
|
||||
video_driver_get_size(NULL, &height);
|
||||
|
||||
/* FIXME: this shouldn't be happening at all */
|
||||
if (selection >= selection_buf->size)
|
||||
selection = selection_buf->size ? selection_buf->size - 1 : 0;
|
||||
|
||||
xmb->selection_ptr_old = selection;
|
||||
|
||||
xmb_calculate_visible_range(xmb, height, selection_buf->size,
|
||||
xmb->selection_ptr_old, &first, &last);
|
||||
|
||||
@ -4021,7 +4021,11 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
|
||||
last -= first;
|
||||
first = 0;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
selection = 0;
|
||||
xmb->selection_ptr_old = 0;
|
||||
}
|
||||
|
||||
list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL)
|
||||
+ xmb->system_tab_end;
|
||||
|
Loading…
x
Reference in New Issue
Block a user