summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/misc.c10
1 files changed, 5 insertions, 5 deletions
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)
434 434
435 /* BMP image goes bottom up */ 435 /* BMP image goes bottom up */
436#if LCD_DEPTH == 1 436#if LCD_DEPTH == 1
437 for (by = LCD_HEIGHT/8 - 1; by >= 0; by--) 437 for (by = LCD_FBHEIGHT - 1; by >= 0; by--)
438 { 438 {
439 unsigned char *src = &lcd_framebuffer[by][0]; 439 unsigned char *src = &lcd_framebuffer[by][0];
440 unsigned char *dst = &line_block[0][0]; 440 unsigned char *dst = &line_block[0][0];
@@ -467,16 +467,16 @@ void screen_dump(void)
467 } 467 }
468#elif LCD_DEPTH == 2 468#elif LCD_DEPTH == 2
469#if LCD_PIXELFORMAT == HORIZONTAL_PACKING 469#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
470 for (by = LCD_HEIGHT - 1; by >= 0; by--) 470 for (by = LCD_FBHEIGHT - 1; by >= 0; by--)
471 { 471 {
472 unsigned char *src = &lcd_framebuffer[by][0]; 472 unsigned char *src = &lcd_framebuffer[by][0];
473 unsigned char *dst = line_block; 473 unsigned char *dst = line_block;
474 474
475 memset(line_block, 0, sizeof(line_block)); 475 memset(line_block, 0, sizeof(line_block));
476 for (bx = (LCD_WIDTH+3)/4; bx > 0; bx--) 476 for (bx = LCD_FBWIDTH; bx > 0; bx--)
477 { 477 {
478 unsigned src_byte = *src++; 478 unsigned src_byte = *src++;
479 479
480 *dst++ = ((src_byte >> 2) & 0x30) | ((src_byte >> 4) & 0x03); 480 *dst++ = ((src_byte >> 2) & 0x30) | ((src_byte >> 4) & 0x03);
481 *dst++ = ((src_byte << 2) & 0x30) | (src_byte & 0x03); 481 *dst++ = ((src_byte << 2) & 0x30) | (src_byte & 0x03);
482 } 482 }
@@ -484,7 +484,7 @@ void screen_dump(void)
484 write(fh, line_block, sizeof(line_block)); 484 write(fh, line_block, sizeof(line_block));
485 } 485 }
486#else /* VERTICAL_PACKING */ 486#else /* VERTICAL_PACKING */
487 for (by = LCD_HEIGHT/4 - 1; by >= 0; by--) 487 for (by = LCD_FBHEIGHT - 1; by >= 0; by--)
488 { 488 {
489 unsigned char *src = &lcd_framebuffer[by][0]; 489 unsigned char *src = &lcd_framebuffer[by][0];
490 unsigned char *dst = &line_block[3][0]; 490 unsigned char *dst = &line_block[3][0];