summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/creative-zen
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/creative-zen')
-rw-r--r--firmware/target/arm/imx233/creative-zen/lcd-zen.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/firmware/target/arm/imx233/creative-zen/lcd-zen.c b/firmware/target/arm/imx233/creative-zen/lcd-zen.c
index fd7d3e0205..22d643c778 100644
--- a/firmware/target/arm/imx233/creative-zen/lcd-zen.c
+++ b/firmware/target/arm/imx233/creative-zen/lcd-zen.c
@@ -339,13 +339,15 @@ void lcd_update_rect(int x, int y, int w, int h)
339 if(!lcd_on) 339 if(!lcd_on)
340 return; 340 return;
341 #endif 341 #endif
342 uint8_t *p = FRAME; 342 for(int yy = y; yy < y + h; yy++)
343 for(int y = 0; y < LCD_HEIGHT; y++) 343 {
344 for(int x = 0; x < LCD_WIDTH; x++) 344 uint16_t *pix = FBADDR(x, yy);
345 uint8_t *p = 3 * (yy * LCD_WIDTH + x) + (uint8_t *)FRAME;
346 for(int xx = 0; xx < w; xx++, pix++)
345 { 347 {
346 uint16_t pix = *FBADDR(x,y); 348 *p++ = RGB_UNPACK_RED(*pix);
347 *p++ = RGB_UNPACK_RED(pix); 349 *p++ = RGB_UNPACK_GREEN(*pix);
348 *p++ = RGB_UNPACK_GREEN(pix); 350 *p++ = RGB_UNPACK_BLUE(*pix);
349 *p++ = RGB_UNPACK_BLUE(pix);
350 } 351 }
352 }
351} 353}