mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
Moved RTL handling in lcd driver deeper, from puts_style_offset() to putsxyofs()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22986 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
54f048eca5
commit
eb4020134e
1 changed files with 8 additions and 2 deletions
|
@ -85,6 +85,14 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
|
||||||
|
|
||||||
ucs = bidi_l2v(str, 1);
|
ucs = bidi_l2v(str, 1);
|
||||||
|
|
||||||
|
if (VP_IS_RTL(current_vp))
|
||||||
|
{
|
||||||
|
int w;
|
||||||
|
|
||||||
|
LCDFN(getstringsize)(str, &w, NULL);
|
||||||
|
x = current_vp->width - w - x;
|
||||||
|
}
|
||||||
|
|
||||||
while ((ch = *ucs++) != 0 && x < current_vp->width)
|
while ((ch = *ucs++) != 0 && x < current_vp->width)
|
||||||
{
|
{
|
||||||
int width;
|
int width;
|
||||||
|
@ -177,8 +185,6 @@ void LCDFN(puts_style_offset)(int x, int y, const unsigned char *str,
|
||||||
chars_in_str = utf8length((char *)str);
|
chars_in_str = utf8length((char *)str);
|
||||||
LCDFN(getstringsize)(str, &w, &h);
|
LCDFN(getstringsize)(str, &w, &h);
|
||||||
xpos = x * w / chars_in_str;
|
xpos = x * w / chars_in_str;
|
||||||
if (VP_IS_RTL(current_vp))
|
|
||||||
xpos = current_vp->width - w - xpos;
|
|
||||||
ypos = y * h;
|
ypos = y * h;
|
||||||
LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, offset);
|
LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, offset);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue