diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 98daf96de2..6b4889e0cf 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -343,9 +343,7 @@ static void rgui_render(void) && !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) + if (!menu_display_update_pending()) return; /* ensures the framebuffer will be rendered on the screen */ diff --git a/menu/menu.c b/menu/menu.c index 9b5f773ac7..906379108a 100644 --- a/menu/menu.c +++ b/menu/menu.c @@ -24,6 +24,16 @@ #include "../../performance.h" #include +bool menu_display_update_pending(void) +{ + if (g_runloop.frames.video.current.menu.action.active || + g_runloop.frames.video.current.menu.animation.is_active || + g_runloop.frames.video.current.menu.label.is_updated || + g_runloop.frames.video.current.menu.framebuf.dirty) + return true; + return false; +} + /** ** draw_frame: * @@ -48,11 +58,8 @@ static void draw_frame(void) } } - if (g_runloop.frames.video.current.menu.action.active || - g_runloop.frames.video.current.menu.animation.is_active || - g_runloop.frames.video.current.menu.label.is_updated || - g_runloop.frames.video.current.menu.framebuf.dirty) - rarch_render_cached_frame(); + if (menu_display_update_pending()) + rarch_render_cached_frame(); } /** diff --git a/menu/menu.h b/menu/menu.h index 1cc16c7542..0235864a72 100644 --- a/menu/menu.h +++ b/menu/menu.h @@ -196,6 +196,8 @@ void menu_update_system_info(menu_handle_t *menu, bool *load_no_content); void menu_apply_deferred_settings(void); +bool menu_display_update_pending(void); + #ifdef __cplusplus } #endif