summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-bitmap-common.c2
-rw-r--r--firmware/export/lcd.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index 0dafe092fc..9d88eba3b2 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -177,7 +177,7 @@ void LCDFN(puts_style_offset)(int x, int y, const unsigned char *str,
177 chars_in_str = utf8length((char *)str); 177 chars_in_str = utf8length((char *)str);
178 LCDFN(getstringsize)(str, &w, &h); 178 LCDFN(getstringsize)(str, &w, &h);
179 xpos = x * w / chars_in_str; 179 xpos = x * w / chars_in_str;
180 if (current_vp->flags & VP_IS_RTL) 180 if (VP_IS_RTL(current_vp))
181 xpos = current_vp->width - w - xpos; 181 xpos = current_vp->width - w - xpos;
182 ypos = y * h; 182 ypos = y * h;
183 LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, offset); 183 LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, offset);
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index ddfba2a8ac..2c66b5f8b3 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -26,7 +26,9 @@
26#include "cpu.h" 26#include "cpu.h"
27#include "config.h" 27#include "config.h"
28 28
29#define VP_IS_RTL 0x01 29#define VP_FLAG_IS_RTL 0x01
30
31#define VP_IS_RTL(vp) (((vp)->flags & VP_FLAG_IS_RTL) != 0)
30 32
31struct viewport { 33struct viewport {
32 int x; 34 int x;