diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2014-01-07 22:14:41 +0100 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2014-01-07 22:14:41 +0100 |
| commit | d146970ca1e5c9b0641301d50823d29b2e25c9e4 (patch) | |
| tree | 30f738042a8d81e9336b594d1d52ec75e428d3b2 /apps/plugins/lib/grey_parm.c | |
| parent | e1c7b3b8f72becc9079c04253a2985f577850a48 (diff) | |
| download | rockbox-d146970ca1e5c9b0641301d50823d29b2e25c9e4.zip rockbox-d146970ca1e5c9b0641301d50823d29b2e25c9e4.tar.gz rockbox-d146970ca1e5c9b0641301d50823d29b2e25c9e4.tar.bz2 rockbox-d146970ca1e5c9b0641301d50823d29b2e25c9e4.tar.xz | |
lcd/grey: Enable viewport fg_pattern and bg_pattern for all bitmap targets.
Greylib performed a horrible hack and stored fg and bg patterns in other
struct viewport fields. One of them was just removed. So instead of
this hack simply enable the *_pattern fields for mono targets as well,
so that greylib can use them normally.
Change-Id: Ib0842ebcc97f5bf9d9382b4471903afa2f96f39f
Diffstat (limited to 'apps/plugins/lib/grey_parm.c')
| -rw-r--r-- | apps/plugins/lib/grey_parm.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/plugins/lib/grey_parm.c b/apps/plugins/lib/grey_parm.c index 9b4ba8c..d2dfde4 100644 --- a/apps/plugins/lib/grey_parm.c +++ b/apps/plugins/lib/grey_parm.c @@ -79,25 +79,25 @@ int grey_get_drawmode(void) /* Set the foreground shade for subsequent drawing operations */ void grey_set_foreground(unsigned brightness) { - _GREY_FG_BRIGHTNESS(_grey_info.vp) = brightness; + _grey_info.vp->fg_pattern = brightness; } /* Return the current foreground shade */ unsigned grey_get_foreground(void) { - return _GREY_FG_BRIGHTNESS(_grey_info.vp); + return _grey_info.vp->fg_pattern; } /* Set the background shade for subsequent drawing operations */ void grey_set_background(unsigned brightness) { - _GREY_BG_BRIGHTNESS(_grey_info.vp) = brightness; + _grey_info.vp->bg_pattern = brightness; } /* Return the current background shade */ unsigned grey_get_background(void) { - return _GREY_BG_BRIGHTNESS(_grey_info.vp); + return _grey_info.vp->bg_pattern; } /* Set draw mode, foreground and background shades at once */ @@ -177,8 +177,8 @@ void grey_viewport_set_fullscreen(struct viewport *vp, vp->y = 0; vp->width = _grey_info.width; vp->height = _grey_info.height; - _GREY_FG_BRIGHTNESS(vp) = 0; - _GREY_BG_BRIGHTNESS(vp) = 255; + vp->fg_pattern = 0; + vp->bg_pattern = 255; vp->drawmode = DRMODE_SOLID; vp->font = FONT_SYSFIXED; @@ -258,4 +258,3 @@ void grey_framebuffer_set_pos(int x, int y, int width, int height) grey_update_clip_rect(); } - |