forked from len0rd/rockbox
Fix player and greyscale reds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22224 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dc4e90341c
commit
9f3fc27be4
2 changed files with 27 additions and 13 deletions
|
|
@ -37,12 +37,24 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
#define LINE_SEL_FROM_SETTINGS(vp) \
|
#define LINE_SEL_FROM_SETTINGS(vp) \
|
||||||
do { \
|
do { \
|
||||||
vp->lss_pattern = global_settings.lss_color; \
|
vp->lss_pattern = global_settings.lss_color; \
|
||||||
vp->lse_pattern = global_settings.lse_color; \
|
vp->lse_pattern = global_settings.lse_color; \
|
||||||
vp->lst_pattern = global_settings.lst_color; \
|
vp->lst_pattern = global_settings.lst_color; \
|
||||||
} while (0)
|
} 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
|
||||||
|
#define FG_FALLBACK LCD_DEFAULT_FG
|
||||||
|
#define BG_FALLBACK LCD_DEFAULT_FG
|
||||||
|
#endif
|
||||||
|
|
||||||
static int statusbar_enabled = 0;
|
static int statusbar_enabled = 0;
|
||||||
|
|
||||||
|
|
@ -89,20 +101,17 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen)
|
||||||
#endif
|
#endif
|
||||||
vp->height = screens[screen].lcdheight - (showing_bars(screen)?STATUSBAR_HEIGHT:0);
|
vp->height = screens[screen].lcdheight - (showing_bars(screen)?STATUSBAR_HEIGHT:0);
|
||||||
|
|
||||||
|
#if LCD_DEPTH > 1
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
/* We only need this test if there is a remote LCD */
|
/* We only need this test if there is a remote LCD */
|
||||||
if (screen == SCREEN_MAIN)
|
if (screen == SCREEN_MAIN)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_COLOR
|
vp->fg_pattern = FG_FALLBACK;
|
||||||
vp->fg_pattern = global_settings.fg_color;
|
vp->bg_pattern = BG_FALLBACK;
|
||||||
vp->bg_pattern = global_settings.bg_color;
|
|
||||||
LINE_SEL_FROM_SETTINGS(vp);
|
LINE_SEL_FROM_SETTINGS(vp);
|
||||||
#elif LCD_DEPTH > 1
|
|
||||||
vp->fg_pattern = LCD_DEFAULT_FG;
|
|
||||||
vp->bg_pattern = LCD_DEFAULT_BG;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
||||||
if (screen == SCREEN_REMOTE)
|
if (screen == SCREEN_REMOTE)
|
||||||
|
|
@ -159,6 +168,7 @@ void viewportmanager_statusbar_changed(void* data)
|
||||||
viewportmanager_set_statusbar(statusbar_enabled);
|
viewportmanager_set_statusbar(statusbar_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
const char* viewport_parse_viewport(struct viewport *vp,
|
const char* viewport_parse_viewport(struct viewport *vp,
|
||||||
enum screen_type screen,
|
enum screen_type screen,
|
||||||
const char *bufptr,
|
const char *bufptr,
|
||||||
|
|
@ -219,15 +229,15 @@ const char* viewport_parse_viewport(struct viewport *vp,
|
||||||
if (!LIST_VALUE_PARSED(set, PL_HEIGHT))
|
if (!LIST_VALUE_PARSED(set, PL_HEIGHT))
|
||||||
vp->height = screens[screen].lcdheight - vp->y;
|
vp->height = screens[screen].lcdheight - vp->y;
|
||||||
|
|
||||||
#if (LCD_DEPTH > 1)
|
#if LCD_DEPTH > 1 || LCD_REMOTE_DEPTH > 1
|
||||||
if (!LIST_VALUE_PARSED(set, PL_FG))
|
if (!LIST_VALUE_PARSED(set, PL_FG))
|
||||||
vp->fg_pattern = global_settings.fg_color;
|
vp->fg_pattern = FG_FALLBACK;
|
||||||
if (!LIST_VALUE_PARSED(set, PL_BG))
|
if (!LIST_VALUE_PARSED(set, PL_BG))
|
||||||
vp->bg_pattern = global_settings.bg_color;
|
vp->bg_pattern = BG_FALLBACK;
|
||||||
#endif
|
#endif /* LCD_DEPTH > 1 || LCD_REMOTE_DEPTH > 1 */
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
LINE_SEL_FROM_SETTINGS(vp);
|
LINE_SEL_FROM_SETTINGS(vp);
|
||||||
#endif
|
|
||||||
/* Validate the viewport dimensions - we know that the numbers are
|
/* Validate the viewport dimensions - we know that the numbers are
|
||||||
non-negative integers, ignore bars and assume the viewport takes them
|
non-negative integers, ignore bars and assume the viewport takes them
|
||||||
* into account */
|
* into account */
|
||||||
|
|
@ -249,3 +259,5 @@ const char* viewport_parse_viewport(struct viewport *vp,
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_LCD_BITMAP */
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,12 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen);
|
||||||
/* parse a viewport list, which looks like
|
/* parse a viewport list, which looks like
|
||||||
* X|Y|width|height|font|foregorund color|background color
|
* X|Y|width|height|font|foregorund color|background color
|
||||||
* | is a separator */
|
* | is a separator */
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
const char* viewport_parse_viewport(struct viewport *vp,
|
const char* viewport_parse_viewport(struct viewport *vp,
|
||||||
enum screen_type screen,
|
enum screen_type screen,
|
||||||
const char *bufptr,
|
const char *bufptr,
|
||||||
const char separator);
|
const char separator);
|
||||||
|
#endif
|
||||||
/* Used to specify which screens the statusbar (SB) should be displayed on.
|
/* Used to specify which screens the statusbar (SB) should be displayed on.
|
||||||
*
|
*
|
||||||
* The parameter is a bit OR'ed combination of the following (screen is
|
* The parameter is a bit OR'ed combination of the following (screen is
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue