mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-04 10:36:50 +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)
|
||||
{
|
||||
unsigned fb_width, fb_height;
|
||||
uint16_t *fb_data = NULL;
|
||||
bool fb_dirty = false;
|
||||
uint16_t *fb_data = NULL;
|
||||
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, &fb_dirty);
|
||||
|
||||
if (!fb_dirty)
|
||||
if (!menu_display_ctl(MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, NULL))
|
||||
return;
|
||||
|
||||
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;
|
||||
case MENU_DISPLAY_CTL_UPDATE_PENDING:
|
||||
{
|
||||
bool ptr;
|
||||
menu_display_ctl(
|
||||
MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, &ptr);
|
||||
if (menu_animation_ctl(MENU_ANIMATION_CTL_IS_ACTIVE, NULL) || ptr)
|
||||
if (menu_animation_ctl(MENU_ANIMATION_CTL_IS_ACTIVE, NULL))
|
||||
return true;
|
||||
if (menu_display_ctl(
|
||||
MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, NULL))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -483,13 +483,7 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
|
||||
height, false, true);
|
||||
return true;
|
||||
case MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG:
|
||||
{
|
||||
bool *ptr = (bool*)data;
|
||||
if (!ptr)
|
||||
return false;
|
||||
*ptr = menu_display_framebuf.dirty;
|
||||
}
|
||||
return true;
|
||||
return menu_display_framebuf.dirty;
|
||||
case MENU_DISPLAY_CTL_SET_FRAMEBUFFER_DIRTY_FLAG:
|
||||
if (menu_display_framebuf.data)
|
||||
menu_display_framebuf.dirty = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user