From 51223e53957943c8b4c142882d2aa86d8025837d Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 20 Feb 2007 19:31:34 +0000 Subject: Introduced LCD_FBHEIGHT in addition to the already existing LCD_FBWIDTH to ease framebuffer handling a bit. Added equivalent definitions for the remote LCD. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12419 a1c6a512-1295-4272-9138-f99709370657 --- apps/misc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/misc.c') diff --git a/apps/misc.c b/apps/misc.c index ad93dc2681..22f6fb50a6 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -434,7 +434,7 @@ void screen_dump(void) /* BMP image goes bottom up */ #if LCD_DEPTH == 1 - for (by = LCD_HEIGHT/8 - 1; by >= 0; by--) + for (by = LCD_FBHEIGHT - 1; by >= 0; by--) { unsigned char *src = &lcd_framebuffer[by][0]; unsigned char *dst = &line_block[0][0]; @@ -467,16 +467,16 @@ void screen_dump(void) } #elif LCD_DEPTH == 2 #if LCD_PIXELFORMAT == HORIZONTAL_PACKING - for (by = LCD_HEIGHT - 1; by >= 0; by--) + for (by = LCD_FBHEIGHT - 1; by >= 0; by--) { unsigned char *src = &lcd_framebuffer[by][0]; unsigned char *dst = line_block; memset(line_block, 0, sizeof(line_block)); - for (bx = (LCD_WIDTH+3)/4; bx > 0; bx--) + for (bx = LCD_FBWIDTH; bx > 0; bx--) { unsigned src_byte = *src++; - + *dst++ = ((src_byte >> 2) & 0x30) | ((src_byte >> 4) & 0x03); *dst++ = ((src_byte << 2) & 0x30) | (src_byte & 0x03); } @@ -484,7 +484,7 @@ void screen_dump(void) write(fh, line_block, sizeof(line_block)); } #else /* VERTICAL_PACKING */ - for (by = LCD_HEIGHT/4 - 1; by >= 0; by--) + for (by = LCD_FBHEIGHT - 1; by >= 0; by--) { unsigned char *src = &lcd_framebuffer[by][0]; unsigned char *dst = &line_block[3][0]; -- cgit v1.2.3