diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/splash.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 69691793a8..5b3710f140 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -61,6 +61,9 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
61 | struct viewport vp; | 61 | struct viewport vp; |
62 | int maxw = 0; | 62 | int maxw = 0; |
63 | 63 | ||
64 | viewport_set_defaults(&vp, screen->screen_type); | ||
65 | screen->set_viewport(&vp); | ||
66 | |||
64 | screen->getstringsize(" ", &space_w, &h); | 67 | screen->getstringsize(" ", &space_w, &h); |
65 | #else /* HAVE_LCD_CHARCELLS */ | 68 | #else /* HAVE_LCD_CHARCELLS */ |
66 | 69 | ||
@@ -76,7 +79,7 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
76 | 79 | ||
77 | next = strtok_r(splash_buf, " ", &store); | 80 | next = strtok_r(splash_buf, " ", &store); |
78 | if (!next) | 81 | if (!next) |
79 | return; /* nothing to display */ | 82 | goto end; /* nothing to display */ |
80 | 83 | ||
81 | lines[0] = next; | 84 | lines[0] = next; |
82 | while (true) | 85 | while (true) |
@@ -130,7 +133,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
130 | screen->stop_scroll(); | 133 | screen->stop_scroll(); |
131 | 134 | ||
132 | #ifdef HAVE_LCD_BITMAP | 135 | #ifdef HAVE_LCD_BITMAP |
133 | viewport_set_defaults(&vp, screen->screen_type); | ||
134 | /* If we center the display, then just clear the box we need and put | 136 | /* If we center the display, then just clear the box we need and put |
135 | a nice little frame and put the text in there! */ | 137 | a nice little frame and put the text in there! */ |
136 | vp.y = (screen->lcdheight - y) / 2 - RECT_SPACING; /* height => y start position */ | 138 | vp.y = (screen->lcdheight - y) / 2 - RECT_SPACING; /* height => y start position */ |
@@ -157,7 +159,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
157 | #endif | 159 | #endif |
158 | vp.drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); | 160 | vp.drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); |
159 | 161 | ||
160 | screen->set_viewport(&vp); | ||
161 | screen->fillrect(0, 0, vp.width, vp.height); | 162 | screen->fillrect(0, 0, vp.width, vp.height); |
162 | 163 | ||
163 | #if LCD_DEPTH > 1 | 164 | #if LCD_DEPTH > 1 |
@@ -196,6 +197,7 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
196 | #undef W | 197 | #undef W |
197 | } | 198 | } |
198 | screen->update_viewport(); | 199 | screen->update_viewport(); |
200 | end: | ||
199 | screen->set_viewport(NULL); | 201 | screen->set_viewport(NULL); |
200 | } | 202 | } |
201 | 203 | ||