diff options
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r-- | screen_ui.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp index 29d5491ca..c87c00ce5 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -73,6 +73,7 @@ ScreenRecoveryUI::ScreenRecoveryUI() : installing_frames(-1), stage(-1), max_stage(-1) { + for (int i = 0; i < 5; i++) backgroundIcon[i] = NULL; @@ -86,7 +87,7 @@ void ScreenRecoveryUI::draw_background_locked(Icon icon) { pagesIdentical = false; gr_color(0, 0, 0, 255); - gr_fill(0, 0, gr_fb_width(), gr_fb_height()); + gr_clear(); if (icon) { gr_surface surface = backgroundIcon[icon]; @@ -110,7 +111,6 @@ void ScreenRecoveryUI::draw_background_locked(Icon icon) int textY = ((gr_fb_height() - (iconHeight+textHeight+40+sh)) / 2) + iconHeight + 40; gr_blit(surface, 0, 0, iconWidth, iconHeight, iconX, iconY); - if (stageHeight > 0) { int sw = gr_get_width(stageMarkerEmpty); int x = (gr_fb_width() - max_stage * gr_get_width(stageMarkerEmpty)) / 2; @@ -203,12 +203,12 @@ void ScreenRecoveryUI::SetColor(UIElement e) { // Should only be called with updateMutex locked. void ScreenRecoveryUI::draw_screen_locked() { - draw_background_locked(currentIcon); - draw_progress_locked(); - - if (show_text) { - SetColor(TEXT_FILL); - gr_fill(0, 0, gr_fb_width(), gr_fb_height()); + if (!show_text) { + draw_background_locked(currentIcon); + draw_progress_locked(); + } else { + gr_color(0, 0, 0, 255); + gr_clear(); int y = 0; int i = 0; |