mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 18:35:22 +00:00
RGUI: Do not scroll if all items are visible at once
This commit is contained in:
parent
62c34c7871
commit
b3b92ee563
@ -418,6 +418,10 @@ static void render_text(rgui_handle_t *rgui)
|
||||
rgui->selection_ptr - TERM_HEIGHT / 2 : 0;
|
||||
size_t end = rgui->selection_ptr + TERM_HEIGHT <= rgui->selection_buf->size ?
|
||||
rgui->selection_ptr + TERM_HEIGHT : rgui->selection_buf->size;
|
||||
|
||||
// Do not scroll if all items are visible.
|
||||
if (rgui->selection_buf->size <= TERM_HEIGHT)
|
||||
begin = 0;
|
||||
|
||||
if (end - begin > TERM_HEIGHT)
|
||||
end = begin + TERM_HEIGHT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user