From 50b09109d9887cf35bfbff426e9306f10db8776b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Sun, 8 Mar 2015 15:18:39 -0300 Subject: [PATCH] (Menu) Let the menu driver clear the dirty bits --- menu/drivers/rgui.c | 6 ++++++ menu/menu.c | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index cab9fc0952..c425bd3a66 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -333,14 +333,20 @@ static void rgui_render(void) if (!menu) return; + 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; + 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.framebuf.dirty = false; + menu->mouse.ptr = menu->mouse.y / 11 - 2 + menu->begin; if (menu->mouse.wheeldown && menu->begin diff --git a/menu/menu.c b/menu/menu.c index 6840d56595..4ffad76fc6 100644 --- a/menu/menu.c +++ b/menu/menu.c @@ -402,10 +402,6 @@ int menu_iterate(retro_input_t input, if (g_runloop.is_menu) draw_frame(); - 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.framebuf.dirty = false; - if (ret) return -1;