From b3caa010624248930eaf487b5e151bbe2b9b9f27 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 14 Dec 2011 09:48:52 +0000 Subject: Fix FS#12237 (caused by r30302) where centered skin text isnt eqactly centered git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31246 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-bitmap-common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'firmware/drivers/lcd-bitmap-common.c') diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 76c4260..3806bb0 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -318,8 +318,16 @@ void LCDFN(puts_style_xyoffset)(int x, int y, const unsigned char *str, return; h = current_vp->line_height ?: (int)font_get(current_vp->font)->height; - xpos = x * LCDFN(getstringsize)(" ", NULL, NULL); - ypos = y * h + y_offset; + if ((style&STYLE_XY_PIXELS) == 0) + { + xpos = x * LCDFN(getstringsize)(" ", NULL, NULL); + ypos = y * h + y_offset; + } + else + { + xpos = x; + ypos = y + y_offset; + } LCDFN(putsxyofs_style)(xpos, ypos, str, style, h, x_offset); } -- cgit v1.1