Skip to content

Commit ecc5eb7

Browse files
committed
Fixed ifdefs for loadImage function
1 parent f91724c commit ecc5eb7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/LcdScreen.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,19 @@ PImage PImage::loadImage(const char * fileName) {
261261
return PImage();
262262
}
263263

264+
#if defined(LCD_SCREEN_DEBUG)
264265
bmpFilesize = read32(bmpFile);
266+
#else
267+
(void)read32(bmpFile); // Read & ignore filesize bytes
268+
#endif
265269
(void)read32(bmpFile); // Read & ignore creator bytes
266270
bmpImageoffset = read32(bmpFile); // Start of image data
267271
// Read DIB header
268-
bmpHeadersize = read32(bmpFile);
272+
#if defined(LCD_SCREEN_DEBUG)
273+
bmpHeadersize = read32(bmpFile);
274+
#else
275+
(void)read32(bmpFile); // Read & ignore headersize bytes
276+
#endif
269277
bmpWidth = read32(bmpFile);
270278
bmpHeight = read32(bmpFile);
271279
#if defined(LCD_SCREEN_DEBUG)

0 commit comments

Comments
 (0)