diff --git a/firmware/export/screendump.h b/firmware/export/screendump.h index 9be1f5d3f2..b7acdd344c 100644 --- a/firmware/export/screendump.h +++ b/firmware/export/screendump.h @@ -39,20 +39,29 @@ #define LE16_CONST(x) (x)&0xff, ((x)>>8)&0xff #define LE32_CONST(x) (x)&0xff, ((x)>>8)&0xff, ((x)>>16)&0xff, ((x)>>24)&0xff +#ifndef BMP_BPP #if LCD_DEPTH <= 4 #define BMP_BPP 4 -#define BMP_LINESIZE ((LCD_WIDTH/2 + 3) & ~3) #elif LCD_DEPTH <= 8 #define BMP_BPP 8 -#define BMP_LINESIZE ((LCD_WIDTH + 3) & ~3) #elif LCD_DEPTH <= 16 #define BMP_BPP 16 -#define BMP_LINESIZE ((LCD_WIDTH*2 + 3) & ~3) #else #define BMP_BPP 24 -#define BMP_LINESIZE ((LCD_WIDTH*3 + 3) & ~3) +#endif #endif +#ifndef BMP_LINESIZE +#if LCD_DEPTH <= 4 +#define BMP_LINESIZE ((LCD_WIDTH/2 + 3) & ~3) +#elif LCD_DEPTH <= 8 +#define BMP_LINESIZE ((LCD_WIDTH + 3) & ~3) +#elif LCD_DEPTH <= 16 +#define BMP_LINESIZE ((LCD_WIDTH*2 + 3) & ~3) +#else +#define BMP_LINESIZE ((LCD_WIDTH*3 + 3) & ~3) +#endif +#endif #ifdef BOOTLOADER