diff options
Diffstat (limited to 'apps/gui/splash.c')
-rw-r--r-- | apps/gui/splash.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index aa03e2e2db..10dee12052 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -137,19 +137,16 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
137 | 137 | ||
138 | #ifdef HAVE_LCD_BITMAP | 138 | #ifdef HAVE_LCD_BITMAP |
139 | 139 | ||
140 | vp.y += (vp.height - y) / 2 - RECT_SPACING; /* height => y start position */ | ||
141 | vp.x += (vp.width - maxw) / 2 - RECT_SPACING; | ||
142 | width = maxw + 2*RECT_SPACING; | 140 | width = maxw + 2*RECT_SPACING; |
143 | height = y + 2*RECT_SPACING; | 141 | height = y + 2*RECT_SPACING; |
144 | 142 | ||
145 | if (vp.y < 0) | ||
146 | vp.y = 0; | ||
147 | if (vp.x < 0) | ||
148 | vp.x = 0; | ||
149 | if (width > vp.width) | 143 | if (width > vp.width) |
150 | width = vp.width; | 144 | width = vp.width; |
151 | if (height > vp.height) | 145 | if (height > vp.height) |
152 | height = vp.height; | 146 | height = vp.height; |
147 | |||
148 | vp.x += (vp.width - width) / 2; | ||
149 | vp.y += (vp.height - height) / 2; | ||
153 | vp.width = width; | 150 | vp.width = width; |
154 | vp.height = height; | 151 | vp.height = height; |
155 | 152 | ||