mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
Simply 'framebuffer dirty' code
This commit is contained in:
parent
72ce7e8fd2
commit
d092e20b5a
@ -730,12 +730,9 @@ static void rgui_free(void *data)
|
|||||||
static void rgui_set_texture(void)
|
static void rgui_set_texture(void)
|
||||||
{
|
{
|
||||||
unsigned fb_width, fb_height;
|
unsigned fb_width, fb_height;
|
||||||
uint16_t *fb_data = NULL;
|
uint16_t *fb_data = NULL;
|
||||||
bool fb_dirty = false;
|
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, &fb_dirty);
|
if (!menu_display_ctl(MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, NULL))
|
||||||
|
|
||||||
if (!fb_dirty)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_WIDTH, &fb_width);
|
menu_display_ctl(MENU_DISPLAY_CTL_WIDTH, &fb_width);
|
||||||
|
@ -465,10 +465,10 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
|
|||||||
return true;
|
return true;
|
||||||
case MENU_DISPLAY_CTL_UPDATE_PENDING:
|
case MENU_DISPLAY_CTL_UPDATE_PENDING:
|
||||||
{
|
{
|
||||||
bool ptr;
|
if (menu_animation_ctl(MENU_ANIMATION_CTL_IS_ACTIVE, NULL))
|
||||||
menu_display_ctl(
|
return true;
|
||||||
MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, &ptr);
|
if (menu_display_ctl(
|
||||||
if (menu_animation_ctl(MENU_ANIMATION_CTL_IS_ACTIVE, NULL) || ptr)
|
MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, NULL))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -483,13 +483,7 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
|
|||||||
height, false, true);
|
height, false, true);
|
||||||
return true;
|
return true;
|
||||||
case MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG:
|
case MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG:
|
||||||
{
|
return menu_display_framebuf.dirty;
|
||||||
bool *ptr = (bool*)data;
|
|
||||||
if (!ptr)
|
|
||||||
return false;
|
|
||||||
*ptr = menu_display_framebuf.dirty;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
case MENU_DISPLAY_CTL_SET_FRAMEBUFFER_DIRTY_FLAG:
|
case MENU_DISPLAY_CTL_SET_FRAMEBUFFER_DIRTY_FLAG:
|
||||||
if (menu_display_framebuf.data)
|
if (menu_display_framebuf.data)
|
||||||
menu_display_framebuf.dirty = true;
|
menu_display_framebuf.dirty = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user