(RGUI) Only render when needed

This commit is contained in:
Higor Eurípedes 2015-03-08 14:12:13 -03:00
parent de883704e4
commit 7d41e01e93

View File

@ -45,6 +45,9 @@ static int rgui_entry_iterate(unsigned action)
if (!menu->menu_list)
return -1;
if (action != MENU_ACTION_NOOP || menu->need_refresh)
g_runloop.frames.video.current.menu.framebuf.dirty = true;
cbs = (menu_file_list_cbs_t*)menu_list_get_actiondata_at_offset(
menu->menu_list->selection_buf, menu->navigation.selection_ptr);
@ -333,6 +336,10 @@ static void rgui_render(void)
if (menu->need_refresh && g_runloop.is_menu
&& !menu->msg_force)
return;
if (!g_runloop.frames.video.current.menu.framebuf.dirty
&& !g_runloop.frames.video.current.menu.animation.is_active
&& !g_runloop.frames.video.current.menu.label.is_updated)
return;
menu->mouse.ptr = menu->mouse.y / 11 - 2 + menu->begin;