From a092b9ce923b3355868f0f7e99bf1d7cf2f83181 Mon Sep 17 00:00:00 2001 From: Tomer Shalev Date: Tue, 6 Oct 2009 08:07:30 +0000 Subject: Use macro to test viewport's RTL flag git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22978 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-bitmap-common.c | 2 +- firmware/export/lcd.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'firmware') 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, chars_in_str = utf8length((char *)str); LCDFN(getstringsize)(str, &w, &h); xpos = x * w / chars_in_str; - if (current_vp->flags & VP_IS_RTL) + if (VP_IS_RTL(current_vp)) xpos = current_vp->width - w - xpos; ypos = y * h; 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 @@ #include "cpu.h" #include "config.h" -#define VP_IS_RTL 0x01 +#define VP_FLAG_IS_RTL 0x01 + +#define VP_IS_RTL(vp) (((vp)->flags & VP_FLAG_IS_RTL) != 0) struct viewport { int x; -- cgit v1.2.3