mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 03:40:03 +00:00
Merge pull request #294 from pinumbernumber/master
Do not scroll RGUI if all items are visible at once
This commit is contained in:
commit
0720eedd2a
@ -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