mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-02 21:37:14 +00:00
Merge pull request #1748 from heuripedes/master
(GLUI) Optimize glui_render_menu_list()
This commit is contained in:
commit
0594e5aa83
@ -297,7 +297,14 @@ static void glui_render_menu_list(glui_handle_t *glui,
|
||||
char entry_path[PATH_MAX_LENGTH], entry_value[PATH_MAX_LENGTH];
|
||||
char message[PATH_MAX_LENGTH],
|
||||
entry_title_buf[PATH_MAX_LENGTH], type_str_buf[PATH_MAX_LENGTH];
|
||||
bool entry_selected = menu_entry_is_currently_selected(i);
|
||||
bool entry_selected;
|
||||
|
||||
y = menu->header_height - menu->scroll_y + (glui->line_height * i);
|
||||
|
||||
if (y > height || y + glui->line_height < 0)
|
||||
continue;
|
||||
|
||||
entry_selected = menu_entry_is_currently_selected(i);
|
||||
menu_entry_get_value(i, entry_value, sizeof(entry_value));
|
||||
menu_entry_get_path(i, entry_path, sizeof(entry_path));
|
||||
|
||||
@ -308,8 +315,6 @@ static void glui_render_menu_list(glui_handle_t *glui,
|
||||
|
||||
strlcpy(message, entry_title_buf, sizeof(message));
|
||||
|
||||
y = menu->header_height - menu->scroll_y + (glui->line_height * i);
|
||||
|
||||
glui_blit_line(glui->margin, y, message,
|
||||
entry_selected ? hover_color : normal_color, TEXT_ALIGN_LEFT);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user