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
This commit is contained in:
Jonathan Gordon 2011-12-14 09:48:52 +00:00
parent bfd69f2aa1
commit b3caa01062
3 changed files with 32 additions and 17 deletions

View file

@ -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);
}