Fix red: Protect viewport RTL flag manipulation with #ifdef HAVE_LCD_BITMAP
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22973 a1c6a512-1295-4272-9138-f99709370657
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index bfdd1ce..1db1a81 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -55,7 +55,9 @@
#include "system.h"
#include "statusbar.h"
#include "appevents.h"
+#ifdef HAVE_LCD_BITMAP
#include "language.h"
+#endif
static int statusbar_enabled = 0;
@@ -148,8 +150,10 @@
#endif
viewport_set_fullscreen(vp, screen);
+#ifdef HAVE_LCD_BITMAP
vp->flags &= ~VP_IS_RTL;
vp->flags |= lang_is_rtl() ? VP_IS_RTL : 0;
+#endif
}
void viewportmanager_init(void)
diff --git a/apps/language.c b/apps/language.c
index fad136e..0737a48 100644
--- a/apps/language.c
+++ b/apps/language.c
@@ -25,7 +25,9 @@
#include "lang.h"
#include "debug.h"
#include "string.h"
+#ifdef HAVE_LCD_BITMAP
#include "viewport.h"
+#endif
/* The following header is generated by the build system and only defines
MAX_LANGUAGE_SIZE to be the size of the largest currently available
@@ -114,7 +116,9 @@
else
{
lang_options = lang_header[3];
+#ifdef HAVE_LCD_BITMAP
viewportmanager_theme_changed(THEME_UI_VIEWPORT);
+#endif
}
return retcode;
}