Cleanups
This commit is contained in:
parent
5bbbf72b17
commit
cd1875ceb4
|
@ -51,17 +51,15 @@ static bool menu_display_fb_in_use(menu_framebuf_t *frame_buf)
|
|||
void menu_display_fb_set_dirty(void)
|
||||
{
|
||||
menu_framebuf_t *frame_buf = menu_display_fb_get_ptr();
|
||||
if (!menu_display_fb_in_use(frame_buf))
|
||||
return;
|
||||
frame_buf->dirty = true;
|
||||
if (menu_display_fb_in_use(frame_buf))
|
||||
frame_buf->dirty = true;
|
||||
}
|
||||
|
||||
void menu_display_fb_unset_dirty(void)
|
||||
{
|
||||
menu_framebuf_t *frame_buf = menu_display_fb_get_ptr();
|
||||
if (!menu_display_fb_in_use(frame_buf))
|
||||
return;
|
||||
frame_buf->dirty = false;
|
||||
if (menu_display_fb_in_use(frame_buf))
|
||||
frame_buf->dirty = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -97,9 +95,9 @@ bool menu_display_update_pending(void)
|
|||
menu_animation_t *anim = menu_animation_get_ptr();
|
||||
menu_framebuf_t *frame_buf = menu_display_fb_get_ptr();
|
||||
|
||||
if ((anim && anim->is_active) || (anim && anim->label.is_updated))
|
||||
return true;
|
||||
if (frame_buf && frame_buf->dirty)
|
||||
if ((anim && anim->is_active) || (anim && anim->label.is_updated)
|
||||
|| (frame_buf && frame_buf->dirty)
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -40,10 +40,8 @@ void menu_entries_set_start(size_t i)
|
|||
{
|
||||
menu_entries_t *entries = menu_entries_get_ptr();
|
||||
|
||||
if (!entries)
|
||||
return;
|
||||
|
||||
entries->begin = i;
|
||||
if (entries)
|
||||
entries->begin = i;
|
||||
}
|
||||
|
||||
/* Returns the starting index of the menu entry list. */
|
||||
|
@ -182,31 +180,27 @@ bool menu_entries_needs_refresh(void)
|
|||
void menu_entries_set_nonblocking_refresh(void)
|
||||
{
|
||||
menu_entries_t *entries = menu_entries_get_ptr();
|
||||
if (!entries)
|
||||
return;
|
||||
entries->nonblocking_refresh = true;
|
||||
if (entries)
|
||||
entries->nonblocking_refresh = true;
|
||||
}
|
||||
|
||||
void menu_entries_unset_nonblocking_refresh(void)
|
||||
{
|
||||
menu_entries_t *entries = menu_entries_get_ptr();
|
||||
if (!entries)
|
||||
return;
|
||||
entries->nonblocking_refresh = false;
|
||||
if (entries)
|
||||
entries->nonblocking_refresh = false;
|
||||
}
|
||||
|
||||
void menu_entries_set_refresh(void)
|
||||
{
|
||||
menu_entries_t *entries = menu_entries_get_ptr();
|
||||
if (!entries)
|
||||
return;
|
||||
entries->need_refresh = true;
|
||||
if (entries)
|
||||
entries->need_refresh = true;
|
||||
}
|
||||
|
||||
void menu_entries_unset_refresh(void)
|
||||
{
|
||||
menu_entries_t *entries = menu_entries_get_ptr();
|
||||
if (!entries)
|
||||
return;
|
||||
entries->need_refresh = false;
|
||||
if (entries)
|
||||
entries->need_refresh = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue