summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-16bit-common.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-16bit-common.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-16bit-common.c')
-rw-r--r--firmware/drivers/lcd-16bit-common.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c
index 423ea183dc..f8673ec6db 100644
--- a/firmware/drivers/lcd-16bit-common.c
+++ b/firmware/drivers/lcd-16bit-common.c
@@ -68,48 +68,6 @@ void lcd_init(void)
68 lcd_init_device(); 68 lcd_init_device();
69 scroll_init(); 69 scroll_init();
70} 70}
71/*** Viewports ***/
72
73void lcd_set_viewport(struct viewport* vp)
74{
75 if (vp == NULL)
76 current_vp = &default_vp;
77 else
78 current_vp = vp;
79
80#if defined(SIMULATOR)
81 /* Force the viewport to be within bounds. If this happens it should
82 * be considered an error - the viewport will not draw as it might be
83 * expected.
84 */
85 if((unsigned) current_vp->x > (unsigned) LCD_WIDTH
86 || (unsigned) current_vp->y > (unsigned) LCD_HEIGHT
87 || current_vp->x + current_vp->width > LCD_WIDTH
88 || current_vp->y + current_vp->height > LCD_HEIGHT)
89 {
90#if !defined(HAVE_VIEWPORT_CLIP)
91 DEBUGF("ERROR: "
92#else
93 DEBUGF("NOTE: "
94#endif
95 "set_viewport out of bounds: x: %d y: %d width: %d height:%d\n",
96 current_vp->x, current_vp->y,
97 current_vp->width, current_vp->height);
98 }
99
100#endif
101}
102
103void lcd_update_viewport(void)
104{
105 lcd_update_rect(current_vp->x, current_vp->y,
106 current_vp->width, current_vp->height);
107}
108
109void lcd_update_viewport_rect(int x, int y, int width, int height)
110{
111 lcd_update_rect(current_vp->x + x, current_vp->y + y, width, height);
112}
113 71
114/* Clear the current viewport */ 72/* Clear the current viewport */
115void lcd_clear_viewport(void) 73void lcd_clear_viewport(void)