Allow disabling inclusion of default splash

Saves ~7k
This commit is contained in:
Ave O 2018-08-19 14:13:22 +03:00
parent 5fd9daa364
commit 7b827aa925
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
3 changed files with 6 additions and 1 deletions

View file

@ -52,7 +52,7 @@ OBJS += $(addprefix $(BUILD)/$(TARGET)/, \
)
ARCH := -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork
CUSTOMDEFINES := -DMENU_LOGO_ENABLE #-DDEBUG
CUSTOMDEFINES := #-DSPLASH_ENABLE #-DMENU_LOGO_ENABLE #-DDEBUG
CFLAGS = $(ARCH) -O2 -nostdlib -flto -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-inline -std=gnu11 -Wall $(CUSTOMDEFINES)
LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections

View file

@ -501,6 +501,8 @@ static unsigned char Kc_MENU_LOGO_blz[SZ_MENU_LOGO_BLZ] = {
#endif //MENU_LOGO_ENABLE
#ifdef SPLASH_ENABLE
// 68 x 192 @8bpp Grayscale RAW.
#define X_BOOTLOGO 68
#define Y_BOOTLOGO 192
@ -927,5 +929,6 @@ static u8 BOOTLOGO_BLZ[SZ_BOOTLOGO_BLZ] = {
0x1C, 0x1C, 0x1C, 0x1D, 0x0E, 0x1C, 0x0A, 0xA0, 0x1B, 0x03, 0x30, 0x00, 0x00, 0x1B, 0x1B, 0x1B,
0x1A, 0xFF, 0xFF, 0xFF, 0x30, 0x1A, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0xD0, 0x18, 0x00, 0x00
};
#endif //SPLASH_ENABLE
#endif

View file

@ -2063,6 +2063,7 @@ void auto_launch_firmware()
gfx_render_bmp_argb(&gfx_ctxt, (u32 *)BOOTLOGO, bmpData.size_x, bmpData.size_y,
bmpData.pos_x, bmpData.pos_y);
}
#ifdef SPLASH_ENABLE
else
{
BOOTLOGO = (void *)malloc(0x4000);
@ -2070,6 +2071,7 @@ void auto_launch_firmware()
gfx_set_rect_grey(&gfx_ctxt, BOOTLOGO, X_BOOTLOGO, Y_BOOTLOGO, 326, 544);
free(BOOTLOGO);
}
#endif
free(BOOTLOGO);
display_backlight(true);