diff options
author | Tomer Shalev <shalev.tomer@gmail.com> | 2009-10-06 08:07:30 +0000 |
---|---|---|
committer | Tomer Shalev <shalev.tomer@gmail.com> | 2009-10-06 08:07:30 +0000 |
commit | a092b9ce923b3355868f0f7e99bf1d7cf2f83181 (patch) | |
tree | 930c0ad1b518107538a3f2edbdcebf913a342465 /firmware | |
parent | 8b6161b24b642ce6ac7e74218de1f64728f747f9 (diff) | |
download | rockbox-a092b9ce923b3355868f0f7e99bf1d7cf2f83181.tar.gz rockbox-a092b9ce923b3355868f0f7e99bf1d7cf2f83181.zip |
Use macro to test viewport's RTL flag
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22978 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 2 | ||||
-rw-r--r-- | firmware/export/lcd.h | 4 |
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 | ||
31 | struct viewport { | 33 | struct viewport { |
32 | int x; | 34 | int x; |