mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
(RGUI) Call set_texture_frame only when the framebuffer is dirty
This commit is contained in:
parent
770f5e3449
commit
50ff11fdec
@ -46,7 +46,11 @@ static int rgui_entry_iterate(unsigned action)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (action != MENU_ACTION_NOOP || menu->need_refresh)
|
if (action != MENU_ACTION_NOOP || menu->need_refresh)
|
||||||
g_runloop.frames.video.current.menu.framebuf.dirty = true;
|
{
|
||||||
|
g_runloop.frames.video.current.menu.framebuf.dirty = true;
|
||||||
|
g_runloop.frames.video.current.menu.label.is_updated = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cbs = (menu_file_list_cbs_t*)menu_list_get_actiondata_at_offset(
|
cbs = (menu_file_list_cbs_t*)menu_list_get_actiondata_at_offset(
|
||||||
menu->menu_list->selection_buf, menu->navigation.selection_ptr);
|
menu->menu_list->selection_buf, menu->navigation.selection_ptr);
|
||||||
@ -343,9 +347,9 @@ static void rgui_render(void)
|
|||||||
&& !g_runloop.frames.video.current.menu.label.is_updated)
|
&& !g_runloop.frames.video.current.menu.label.is_updated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* framebuf.dirty will be cleared in set_texture() */
|
||||||
g_runloop.frames.video.current.menu.animation.is_active = false;
|
g_runloop.frames.video.current.menu.animation.is_active = false;
|
||||||
g_runloop.frames.video.current.menu.label.is_updated = false;
|
g_runloop.frames.video.current.menu.label.is_updated = false;
|
||||||
g_runloop.frames.video.current.menu.framebuf.dirty = false;
|
|
||||||
|
|
||||||
menu->mouse.ptr = menu->mouse.y / 11 - 2 + menu->begin;
|
menu->mouse.ptr = menu->mouse.y / 11 - 2 + menu->begin;
|
||||||
|
|
||||||
@ -560,6 +564,10 @@ static void rgui_set_texture(void)
|
|||||||
return;
|
return;
|
||||||
if (!driver.video_poke->set_texture_frame)
|
if (!driver.video_poke->set_texture_frame)
|
||||||
return;
|
return;
|
||||||
|
if (!g_runloop.frames.video.current.menu.framebuf.dirty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_runloop.frames.video.current.menu.framebuf.dirty = false;
|
||||||
|
|
||||||
driver.video_poke->set_texture_frame(driver.video_data,
|
driver.video_poke->set_texture_frame(driver.video_data,
|
||||||
menu->frame_buf.data, false, menu->frame_buf.width, menu->frame_buf.height, 1.0f);
|
menu->frame_buf.data, false, menu->frame_buf.width, menu->frame_buf.height, 1.0f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user