From fa177cb2912b5be3023ec28dd3480436feb5a8a3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 17 Aug 2015 15:49:05 +0200 Subject: [PATCH] (Menu) Cleanups --- menu/menu_display.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/menu/menu_display.c b/menu/menu_display.c index 6e1d0e1120..56239fca10 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -41,24 +41,17 @@ menu_framebuf_t *menu_display_fb_get_ptr(void) return &disp->frame_buf; } -static bool menu_display_fb_in_use(menu_framebuf_t *frame_buf) -{ - if (!frame_buf) - return false; - return (frame_buf->data != NULL); -} - 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)) + if (frame_buf && frame_buf->data) 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)) + if (frame_buf && frame_buf->data) frame_buf->dirty = false; }