feat(color): Remove splash screen and boot loader background, add version info (#4139)

This commit is contained in:
philmoz
2023-10-03 18:47:56 +10:00
committed by GitHub
parent 83ec541de0
commit 71143e797b
6 changed files with 57 additions and 82 deletions
@@ -40,11 +40,6 @@ const uint8_t __bmp_usb_plugged[] {
};
LZ4Bitmap BMP_USB_PLUGGED(BMP_ARGB4444, __bmp_usb_plugged);
const uint8_t __bmp_background[] {
#include "bmp_background.lbm"
};
LZ4Bitmap BMP_BACKGROUND(BMP_ARGB4444, __bmp_background);
#define BL_GREEN COLOR2FLAGS(RGB(73, 219, 62))
#define BL_RED COLOR2FLAGS(RGB(229, 32, 30))
#define BL_BACKGROUND COLOR2FLAGS(BLACK)
@@ -71,28 +66,7 @@ static void bootloaderDrawFooter()
static void bootloaderDrawBackground()
{
// we have plenty of memory, let's cache that background
static BitmapBuffer* _background = nullptr;
if (!_background) {
_background = new BitmapBuffer(BMP_RGB565, LCD_W, LCD_H);
for (int i=0; i<LCD_W; i += BMP_BACKGROUND.width()) {
for (int j=0; j<LCD_H; j += BMP_BACKGROUND.height()) {
BitmapBuffer* bg_bmp = &BMP_BACKGROUND;
_background->drawBitmap(i, j, bg_bmp);
}
}
}
if (_background) {
lcd->drawBitmap(0, 0, _background);
lcd->drawFilledRect(0, 0, LCD_W, LCD_H, SOLID,
COLOR2FLAGS(BLACK), OPACITY(4));
}
else {
lcd->clear(BL_BACKGROUND);
}
lcd->clear(BL_BACKGROUND);
}
void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)