From 2b7d48ede0ea8f36ff7b3166e0bbbd8c346c9207 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sun, 9 Mar 2008 23:53:46 +0000 Subject: Bugfix for new list implementation - correctly assign colours for remote LCDs (fixes wrong colours on X5 remote) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16599 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/viewport.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'apps/gui/viewport.c') diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index ca7e574518..8f264519ed 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -19,6 +19,7 @@ #include "config.h" #include "lcd.h" +#include "lcd-remote.h" #include "font.h" #include "sprintf.h" #include "string.h" @@ -57,7 +58,11 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen) vp->drawmode = DRMODE_SOLID; vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ #endif - if (screens[screen].depth > 1) + +#ifdef HAVE_REMOTE_LCD + /* We only need this test if there is a remote LCD */ + if (screen == SCREEN_MAIN) +#endif { #ifdef HAVE_LCD_COLOR vp->fg_pattern = global_settings.fg_color; @@ -70,4 +75,12 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen) vp->bg_pattern = LCD_DEFAULT_BG; #endif } + +#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 + if (screen == SCREEN_REMOTE) + { + vp->fg_pattern = LCD_REMOTE_DEFAULT_FG; + vp->bg_pattern = LCD_REMOTE_DEFAULT_BG; + } +#endif } -- cgit v1.2.3