From 41a53d2c1c536d20823f357af887c9ff74991efd Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 8 Aug 2005 19:23:28 +0000 Subject: Patch #783877 by Gadi Cohen updated by Naftali Goldstein - Bidirectional text support for Hebrew and Arabic git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7292 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-h100.c | 4 ++++ firmware/drivers/lcd-recorder.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'firmware/drivers') diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c index 5bdb08abd3..bfdceedc35 100644 --- a/firmware/drivers/lcd-h100.c +++ b/firmware/drivers/lcd-h100.c @@ -28,6 +28,7 @@ #include "debug.h" #include "system.h" #include "font.h" +#include "bidi.h" /*** definitions ***/ @@ -992,6 +993,9 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str) int ch; struct font* pf = font_get(curfont); + if (bidi_support_enabled) + str = bidi_l2v(str, 1); + while ((ch = *str++) != '\0' && x < LCD_WIDTH) { int width; diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index cdeb4f2959..53640ce649 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c @@ -28,6 +28,7 @@ #include "system.h" #include "font.h" #include "hwcompat.h" +#include "bidi.h" /*** definitions ***/ @@ -846,6 +847,9 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str) int ch; struct font* pf = font_get(curfont); + if (bidi_support_enabled) + str = bidi_l2v(str, 1); + while ((ch = *str++) != '\0' && x < LCD_WIDTH) { int width; -- cgit v1.2.3