summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-2bit-vert.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-03-26 23:15:56 +0100
committerThomas Martitz <kugel@rockbox.org>2013-12-14 23:11:30 +0100
commit47c8d3c14d8fdaf4749ef5e0380fb0c52140b5fb (patch)
tree1e34394f6367ee4f8e937ee3f610236acaefad6f /firmware/drivers/lcd-2bit-vert.c
parent87c6df98a34154b77c522196c61d89c6f3797416 (diff)
downloadrockbox-47c8d3c14d8fdaf4749ef5e0380fb0c52140b5fb.tar.gz
rockbox-47c8d3c14d8fdaf4749ef5e0380fb0c52140b5fb.zip
lcd-*: Merge common viewport operations into lcd-bitmap-common.c
Change-Id: Ibec2d039ac0ba1214c9bd1b667bc8a9538a0d3d7
Diffstat (limited to 'firmware/drivers/lcd-2bit-vert.c')
-rw-r--r--firmware/drivers/lcd-2bit-vert.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/firmware/drivers/lcd-2bit-vert.c b/firmware/drivers/lcd-2bit-vert.c
index 89c2dc365b..08ec6cac79 100644
--- a/firmware/drivers/lcd-2bit-vert.c
+++ b/firmware/drivers/lcd-2bit-vert.c
@@ -79,53 +79,6 @@ void lcd_init(void)
79 scroll_init(); 79 scroll_init();
80} 80}
81 81
82/*** Viewports ***/
83
84void lcd_set_viewport(struct viewport* vp)
85{
86 if (vp == NULL)
87 current_vp = &default_vp;
88 else
89 current_vp = vp;
90
91 fg_pattern = 0x55 * (~current_vp->fg_pattern & 3);
92 bg_pattern = 0x55 * (~current_vp->bg_pattern & 3);
93
94#if defined(SIMULATOR)
95 /* Force the viewport to be within bounds. If this happens it should
96 * be considered an error - the viewport will not draw as it might be
97 * expected.
98 */
99 if((unsigned) current_vp->x > (unsigned) LCD_WIDTH
100 || (unsigned) current_vp->y > (unsigned) LCD_HEIGHT
101 || current_vp->x + current_vp->width > LCD_WIDTH
102 || current_vp->y + current_vp->height > LCD_HEIGHT)
103 {
104#if !defined(HAVE_VIEWPORT_CLIP)
105 DEBUGF("ERROR: "
106#else
107 DEBUGF("NOTE: "
108#endif
109 "set_viewport out of bounds: x: %d y: %d width: %d height:%d\n",
110 current_vp->x, current_vp->y,
111 current_vp->width, current_vp->height);
112 }
113
114#endif
115}
116
117void lcd_update_viewport(void)
118{
119 lcd_update_rect(current_vp->x, current_vp->y,
120 current_vp->width, current_vp->height);
121}
122
123void lcd_update_viewport_rect(int x, int y, int width, int height)
124{
125 lcd_update_rect(current_vp->x + x, current_vp->y + y, width, height);
126}
127
128
129/*** parameter handling ***/ 82/*** parameter handling ***/
130 83
131void lcd_set_drawmode(int mode) 84void lcd_set_drawmode(int mode)