Create menu_display_update_pending

This commit is contained in:
twinaphex 2015-03-11 16:35:12 +01:00
parent a3759d7ff1
commit 23fde82836
3 changed files with 15 additions and 8 deletions

View File

@ -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 */

View File

@ -24,6 +24,16 @@
#include "../../performance.h"
#include <file/file_path.h>
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();
}
/**

View File

@ -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