diff options
author | Tomer Shalev <shalev.tomer@gmail.com> | 2009-10-06 16:56:13 +0000 |
---|---|---|
committer | Tomer Shalev <shalev.tomer@gmail.com> | 2009-10-06 16:56:13 +0000 |
commit | eb4020134edcfca36964a94cc61b474706f67b4e (patch) | |
tree | e04aee277492146be4d2577c562ac0edd3b72122 | |
parent | 54f048eca5ab31dde3a11f185e577c9d3ddd81a8 (diff) | |
download | rockbox-eb4020134edcfca36964a94cc61b474706f67b4e.tar.gz rockbox-eb4020134edcfca36964a94cc61b474706f67b4e.zip |
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
-rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 9d88eba3b2..b4bc11c706 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -85,6 +85,14 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str) 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) { 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); LCDFN(getstringsize)(str, &w, &h); xpos = x * w / chars_in_str; - if (VP_IS_RTL(current_vp)) - xpos = current_vp->width - w - xpos; ypos = y * h; LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, offset); } |