diff options
Diffstat (limited to 'apps/plugins/imageviewer/imageviewer.c')
-rw-r--r-- | apps/plugins/imageviewer/imageviewer.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c index 37c5838d73..4b1a982438 100644 --- a/apps/plugins/imageviewer/imageviewer.c +++ b/apps/plugins/imageviewer/imageviewer.c | |||
@@ -509,6 +509,13 @@ static void pan_view_up(struct image_info *info) | |||
509 | the bottom */ | 509 | the bottom */ |
510 | static void pan_view_down(struct image_info *info) | 510 | static void pan_view_down(struct image_info *info) |
511 | { | 511 | { |
512 | static fb_data *lcd_fb = NULL; | ||
513 | if (!lcd_fb) | ||
514 | { | ||
515 | struct viewport *vp_main = *(rb->screens[SCREEN_MAIN]->current_viewport); | ||
516 | lcd_fb = vp_main->buffer->fb_ptr; | ||
517 | } | ||
518 | |||
512 | int move; | 519 | int move; |
513 | 520 | ||
514 | move = MIN(VSCROLL, info->height - info->y - LCD_HEIGHT); | 521 | move = MIN(VSCROLL, info->height - info->y - LCD_HEIGHT); |
@@ -526,7 +533,7 @@ static void pan_view_down(struct image_info *info) | |||
526 | */ | 533 | */ |
527 | move++, info->y--; | 534 | move++, info->y--; |
528 | rb->memcpy(rgb_linebuf, | 535 | rb->memcpy(rgb_linebuf, |
529 | *rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH, | 536 | lcd_fb + (LCD_HEIGHT - move)*LCD_WIDTH, |
530 | LCD_WIDTH*sizeof (fb_data)); | 537 | LCD_WIDTH*sizeof (fb_data)); |
531 | } | 538 | } |
532 | #endif | 539 | #endif |
@@ -539,7 +546,7 @@ static void pan_view_down(struct image_info *info) | |||
539 | && settings.jpeg_dither_mode == DITHER_DIFFUSION) | 546 | && settings.jpeg_dither_mode == DITHER_DIFFUSION) |
540 | { | 547 | { |
541 | /* Cover the first row drawn with previous image data. */ | 548 | /* Cover the first row drawn with previous image data. */ |
542 | rb->memcpy(*rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH, | 549 | rb->memcpy(lcd_fb + (LCD_HEIGHT - move)*LCD_WIDTH, |
543 | rgb_linebuf, LCD_WIDTH*sizeof (fb_data)); | 550 | rgb_linebuf, LCD_WIDTH*sizeof (fb_data)); |
544 | info->y++; | 551 | info->y++; |
545 | } | 552 | } |