summaryrefslogtreecommitdiffstats
path: root/apps/language.c
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2009-10-05 11:43:38 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2009-10-05 11:43:38 +0000
commit6d80565b1b5277820593de80bf036304be93c8ef (patch)
tree230b2d57d96190430c757cd98534db290c95bd3e /apps/language.c
parentf06c98fec82e8c800e09603f3022676dbbfdd84b (diff)
downloadrockbox-6d80565b1b5277820593de80bf036304be93c8ef.tar.gz
rockbox-6d80565b1b5277820593de80bf036304be93c8ef.tar.bz2
rockbox-6d80565b1b5277820593de80bf036304be93c8ef.zip
RTL support in menus
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22945 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/language.c')
-rw-r--r--apps/language.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/language.c b/apps/language.c
index bba1359616..0c6245f08c 100644
--- a/apps/language.c
+++ b/apps/language.c
@@ -34,9 +34,10 @@
/* These defines must match the initial bytes in the binary lang file */
/* See tools/genlang (TODO: Use common include for both) */
#define LANGUAGE_COOKIE 0x1a
-#define LANGUAGE_VERSION 0x04
+#define LANGUAGE_VERSION 0x05
+#define LANGUAGE_FLAG_RTL 0x01
-#define HEADER_SIZE 3
+#define HEADER_SIZE 4
static unsigned char language_buffer[MAX_LANGUAGE_SIZE];
@@ -51,6 +52,13 @@ void lang_init(void)
}
}
+static unsigned char lang_options = 0;
+
+int lang_is_rtl(void)
+{
+ return (lang_options & LANGUAGE_FLAG_RTL) != 0;
+}
+
int lang_load(const char *filename)
{
int fsize;
@@ -98,6 +106,7 @@ int lang_load(const char *filename)
retcode = 3;
}
close(fd);
+ lang_options = (retcode ? 0 : lang_header[3]);
return retcode;
}