summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-bitmap-common.c10
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)
85 85
86 ucs = bidi_l2v(str, 1); 86 ucs = bidi_l2v(str, 1);
87 87
88 if (VP_IS_RTL(current_vp))
89 {
90 int w;
91
92 LCDFN(getstringsize)(str, &w, NULL);
93 x = current_vp->width - w - x;
94 }
95
88 while ((ch = *ucs++) != 0 && x < current_vp->width) 96 while ((ch = *ucs++) != 0 && x < current_vp->width)
89 { 97 {
90 int width; 98 int width;
@@ -177,8 +185,6 @@ void LCDFN(puts_style_offset)(int x, int y, const unsigned char *str,
177 chars_in_str = utf8length((char *)str); 185 chars_in_str = utf8length((char *)str);
178 LCDFN(getstringsize)(str, &w, &h); 186 LCDFN(getstringsize)(str, &w, &h);
179 xpos = x * w / chars_in_str; 187 xpos = x * w / chars_in_str;
180 if (VP_IS_RTL(current_vp))
181 xpos = current_vp->width - w - xpos;
182 ypos = y * h; 188 ypos = y * h;
183 LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, offset); 189 LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, offset);
184} 190}