From e87ff2bf91b65d51f41f7db4df3632a30748002d Mon Sep 17 00:00:00 2001 From: Teruaki Kawashima Date: Sat, 10 Jul 2010 13:40:35 +0000 Subject: tweak position of splash so that it is displayed inside the ui viewport. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27371 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/splash.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'apps/gui') 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) #ifdef HAVE_LCD_BITMAP - vp.y += (vp.height - y) / 2 - RECT_SPACING; /* height => y start position */ - vp.x += (vp.width - maxw) / 2 - RECT_SPACING; width = maxw + 2*RECT_SPACING; height = y + 2*RECT_SPACING; - if (vp.y < 0) - vp.y = 0; - if (vp.x < 0) - vp.x = 0; if (width > vp.width) width = vp.width; if (height > vp.height) height = vp.height; + + vp.x += (vp.width - width) / 2; + vp.y += (vp.height - height) / 2; vp.width = width; vp.height = height; -- cgit v1.2.3