summaryrefslogtreecommitdiff
path: root/apps/gui/viewport.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-03-09 23:53:46 +0000
committerDave Chapman <dave@dchapman.com>2008-03-09 23:53:46 +0000
commit2b7d48ede0ea8f36ff7b3166e0bbbd8c346c9207 (patch)
tree45d782e8fe9aff10507f74172b8cfd08192c823a /apps/gui/viewport.c
parent67481f5fd672bac50ae8fa8eb05b6b13ebe25035 (diff)
downloadrockbox-2b7d48ede0ea8f36ff7b3166e0bbbd8c346c9207.tar.gz
rockbox-2b7d48ede0ea8f36ff7b3166e0bbbd8c346c9207.zip
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
Diffstat (limited to 'apps/gui/viewport.c')
-rw-r--r--apps/gui/viewport.c15
1 files changed, 14 insertions, 1 deletions
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 @@
19 19
20#include "config.h" 20#include "config.h"
21#include "lcd.h" 21#include "lcd.h"
22#include "lcd-remote.h"
22#include "font.h" 23#include "font.h"
23#include "sprintf.h" 24#include "sprintf.h"
24#include "string.h" 25#include "string.h"
@@ -57,7 +58,11 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen)
57 vp->drawmode = DRMODE_SOLID; 58 vp->drawmode = DRMODE_SOLID;
58 vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ 59 vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */
59#endif 60#endif
60 if (screens[screen].depth > 1) 61
62#ifdef HAVE_REMOTE_LCD
63 /* We only need this test if there is a remote LCD */
64 if (screen == SCREEN_MAIN)
65#endif
61 { 66 {
62#ifdef HAVE_LCD_COLOR 67#ifdef HAVE_LCD_COLOR
63 vp->fg_pattern = global_settings.fg_color; 68 vp->fg_pattern = global_settings.fg_color;
@@ -70,4 +75,12 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen)
70 vp->bg_pattern = LCD_DEFAULT_BG; 75 vp->bg_pattern = LCD_DEFAULT_BG;
71#endif 76#endif
72 } 77 }
78
79#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
80 if (screen == SCREEN_REMOTE)
81 {
82 vp->fg_pattern = LCD_REMOTE_DEFAULT_FG;
83 vp->bg_pattern = LCD_REMOTE_DEFAULT_BG;
84 }
85#endif
73} 86}