From 81d4d9f046dae2a331d77aee9723c055abea9452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sun, 1 Nov 2015 22:20:49 +0700 Subject: [PATCH] (GLUI) Fix a display bug on switches --- menu/drivers/glui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index 1c595248a3..9bfa9f7955 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -561,7 +561,8 @@ static void glui_render_menu_list(glui_handle_t *glui, gl_t *gl, y = header_height - menu->scroll_y + (glui->line_height * i); - if (y > (int)height || ((y + (int)glui->line_height) < 0)) + if ((y - (int)glui->line_height) > (int)height + || ((y + (int)glui->line_height) < 0)) continue; menu_entry_get(&entry, 0, i, NULL, true);