mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
Refactor MENU_DISPLAY_CTL_UPDATE_PENDING
This commit is contained in:
parent
528a020d86
commit
8223c3d2d3
@ -397,8 +397,12 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
|
||||
}
|
||||
return true;
|
||||
case MENU_DISPLAY_CTL_UPDATE_PENDING:
|
||||
if (menu_animation_ctl(MENU_ANIMATION_CTL_IS_ACTIVE, NULL) || (frame_buf && frame_buf->dirty))
|
||||
return true;
|
||||
{
|
||||
bool ptr;
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG, &ptr);
|
||||
if (menu_animation_ctl(MENU_ANIMATION_CTL_IS_ACTIVE, NULL) || ptr)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
case MENU_DISPLAY_CTL_SET_VIEWPORT:
|
||||
video_driver_get_size(&width, &height);
|
||||
@ -413,7 +417,7 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
|
||||
case MENU_DISPLAY_CTL_GET_FRAMEBUFFER_DIRTY_FLAG:
|
||||
{
|
||||
bool *ptr = (bool*)data;
|
||||
if (!ptr)
|
||||
if (!ptr || !frame_buf)
|
||||
return false;
|
||||
*ptr = frame_buf->dirty;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user