diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-08-12 13:04:12 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-08-12 13:04:12 +0000 |
commit | e4bdc08d0c2468f5d9fa6205495788241d7e562a (patch) | |
tree | 2a652839cd2385191c461e1b6ba8991aa95b6772 | |
parent | 4b7a2ba276d4323a6e7d58243d1a62531081962c (diff) |
Fix FS#10505 - "Background changes to inverted when cleared" as well as a problem that lets the viewport parser reject correct WPSes, both introduced by r22222
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22264 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/gui/viewport.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 2819d36625..d30352a845 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -37,6 +37,7 @@ +/*some short cuts for fg/bg/line selector handling */ #ifdef HAVE_LCD_COLOR #define LINE_SEL_FROM_SETTINGS(vp) \ do { \ @@ -44,16 +45,13 @@ vp->lse_pattern = global_settings.lse_color; \ vp->lst_pattern = global_settings.lst_color; \ } while (0) -#else -#define LINE_SEL_FROM_SETTINGS(vp) -#endif - -#ifdef HAVE_LCD_COLOR #define FG_FALLBACK global_settings.fg_color #define BG_FALLBACK global_settings.bg_color #else +/* mono/greyscale doesn't have most of the above */ +#define LINE_SEL_FROM_SETTINGS(vp) #define FG_FALLBACK LCD_DEFAULT_FG -#define BG_FALLBACK LCD_DEFAULT_FG +#define BG_FALLBACK LCD_DEFAULT_BG #endif static int statusbar_enabled = 0; @@ -169,9 +167,9 @@ void viewportmanager_statusbar_changed(void* data) } #ifdef HAVE_LCD_COLOR -#define ARG_STRING (depth == 2 ? "dddddgg":"dddddcc") +#define ARG_STRING(_depth) ((_depth) == 2 ? "dddddgg":"dddddcc") #else -#define ARG_STRING "dddddcc" +#define ARG_STRING(_depth) "dddddgg" #endif #ifdef HAVE_LCD_BITMAP @@ -209,7 +207,7 @@ const char* viewport_parse_viewport(struct viewport *vp, #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) if (depth >= 2) { - if (!(ptr = parse_list(ARG_STRING, &set, separator, ptr, + if (!(ptr = parse_list(ARG_STRING(depth), &set, separator, ptr, &vp->x, &vp->y, &vp->width, &vp->height, &vp->font, &vp->fg_pattern,&vp->bg_pattern))) return VP_ERROR; |