diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/imageviewer/jpeg/yuv2rgb.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/plugins/imageviewer/jpeg/yuv2rgb.c b/apps/plugins/imageviewer/jpeg/yuv2rgb.c index d0d5cb683b..61d7fd6487 100644 --- a/apps/plugins/imageviewer/jpeg/yuv2rgb.c +++ b/apps/plugins/imageviewer/jpeg/yuv2rgb.c | |||
@@ -236,7 +236,7 @@ static fb_data (* const pixel_funcs[COLOUR_NUM_MODES][DITHER_NUM_MODES])(void) = | |||
236 | [DITHER_DIFFUSION] = pixel_fsdither_to_lcd, | 236 | [DITHER_DIFFUSION] = pixel_fsdither_to_lcd, |
237 | }, | 237 | }, |
238 | }; | 238 | }; |
239 | static fb_data *lcd_fb = NULL; | 239 | |
240 | /* These defines are used fornormal horizontal strides and vertical strides. */ | 240 | /* These defines are used fornormal horizontal strides and vertical strides. */ |
241 | #if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE | 241 | #if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE |
242 | #define LCDADDR(x, y) (lcd_fb + LCD_HEIGHT*(x) + (y)) | 242 | #define LCDADDR(x, y) (lcd_fb + LCD_HEIGHT*(x) + (y)) |
@@ -261,12 +261,8 @@ void yuv_bitmap_part(unsigned char *src[3], int csub_x, int csub_y, | |||
261 | int x, int y, int width, int height, | 261 | int x, int y, int width, int height, |
262 | int colour_mode, int dither_mode) | 262 | int colour_mode, int dither_mode) |
263 | { | 263 | { |
264 | if (!lcd_fb) | 264 | struct viewport *vp_main = *(rb->screens[SCREEN_MAIN]->current_viewport); |
265 | { | 265 | fb_data *lcd_fb = vp_main->buffer->fb_ptr; |
266 | struct viewport *vp_main = *(rb->screens[SCREEN_MAIN]->current_viewport); | ||
267 | lcd_fb = vp_main->buffer->fb_ptr; | ||
268 | } | ||
269 | |||
270 | fb_data *dst, *dst_end; | 266 | fb_data *dst, *dst_end; |
271 | fb_data (*pixel_func)(void); | 267 | fb_data (*pixel_func)(void); |
272 | struct rgb_pixel px; | 268 | struct rgb_pixel px; |