diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2013-03-26 23:15:56 +0100 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2013-12-14 23:11:30 +0100 |
| commit | 47c8d3c14d8fdaf4749ef5e0380fb0c52140b5fb (patch) | |
| tree | 1e34394f6367ee4f8e937ee3f610236acaefad6f /firmware/drivers/lcd-2bit-vi.c | |
| parent | 87c6df98a34154b77c522196c61d89c6f3797416 (diff) | |
| download | rockbox-47c8d3c14d8fdaf4749ef5e0380fb0c52140b5fb.zip rockbox-47c8d3c14d8fdaf4749ef5e0380fb0c52140b5fb.tar.gz rockbox-47c8d3c14d8fdaf4749ef5e0380fb0c52140b5fb.tar.bz2 rockbox-47c8d3c14d8fdaf4749ef5e0380fb0c52140b5fb.tar.xz | |
lcd-*: Merge common viewport operations into lcd-bitmap-common.c
Change-Id: Ibec2d039ac0ba1214c9bd1b667bc8a9538a0d3d7
Diffstat (limited to 'firmware/drivers/lcd-2bit-vi.c')
| -rw-r--r-- | firmware/drivers/lcd-2bit-vi.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/firmware/drivers/lcd-2bit-vi.c b/firmware/drivers/lcd-2bit-vi.c index 8dc746f..b0c41e4 100644 --- a/firmware/drivers/lcd-2bit-vi.c +++ b/firmware/drivers/lcd-2bit-vi.c @@ -74,52 +74,6 @@ static struct viewport * current_vp IBSS_ATTR; static unsigned fg_pattern IBSS_ATTR; static unsigned bg_pattern IBSS_ATTR; -/*** Viewports ***/ - -void LCDFN(set_viewport)(struct viewport* vp) -{ - if (vp == NULL) - current_vp = &default_vp; - else - current_vp = vp; - - fg_pattern = patterns[current_vp->fg_pattern & 3]; - bg_pattern = patterns[current_vp->bg_pattern & 3]; - -#if defined(SIMULATOR) - /* Force the viewport to be within bounds. If this happens it should - * be considered an error - the viewport will not draw as it might be - * expected. - */ - if((unsigned) current_vp->x > (unsigned) LCDM(WIDTH) - || (unsigned) current_vp->y > (unsigned) LCDM(HEIGHT) - || current_vp->x + current_vp->width > LCDM(WIDTH) - || current_vp->y + current_vp->height > LCDM(HEIGHT)) - { -#if !defined(HAVE_VIEWPORT_CLIP) - DEBUGF("ERROR: " -#else - DEBUGF("NOTE: " -#endif - "set_viewport out of bounds: x: %d y: %d width: %d height:%d\n", - current_vp->x, current_vp->y, - current_vp->width, current_vp->height); - } - -#endif -} - -void LCDFN(update_viewport)(void) -{ - LCDFN(update_rect)(current_vp->x, current_vp->y, - current_vp->width, current_vp->height); -} - -void LCDFN(update_viewport_rect)(int x, int y, int width, int height) -{ - LCDFN(update_rect)(current_vp->x + x, current_vp->y + y, width, height); -} - /* LCD init */ void LCDFN(init)(void) { |