summaryrefslogtreecommitdiffstats
path: root/firmware/export/lcd.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-11 12:21:27 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-11 12:21:27 +0000
commita79dc877615c2af571bf0416dd2867c000701e7e (patch)
tree20be2176756c12d56d4e1947a05c2331fe1666ca /firmware/export/lcd.h
parente171294c1d50dc4e4ba30339940a854c2b82d1ea (diff)
downloadrockbox-a79dc877615c2af571bf0416dd2867c000701e7e.tar.gz
rockbox-a79dc877615c2af571bf0416dd2867c000701e7e.zip
Add a center flag, next to the rtl flag, for viewports. That results in any text being drawn centered. It overrides the RTL flag if set.
Simplify splashes and time menu by using it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23105 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/lcd.h')
-rw-r--r--firmware/export/lcd.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 2c66b5f8b3..463714ff03 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -26,9 +26,13 @@
#include "cpu.h"
#include "config.h"
-#define VP_FLAG_IS_RTL 0x01
+#define VP_FLAG_IS_RTL 0x01
+#define VP_FLAG_CENTER_ALIGN 0x02
-#define VP_IS_RTL(vp) (((vp)->flags & VP_FLAG_IS_RTL) != 0)
+#define VP_FLAG_ALIGNMENT_MASK \
+ (VP_FLAG_IS_RTL|VP_FLAG_CENTER_ALIGN)
+
+#define VP_IS_RTL(vp) (((vp)->flags & VP_FLAG_ALIGNMENT_MASK) == VP_FLAG_IS_RTL)
struct viewport {
int x;