Skip to content

Commit

Permalink
Fixed remove bootloader background change PR#4139
Browse files Browse the repository at this point in the history
  • Loading branch information
richardclli committed Oct 9, 2023
1 parent f9e870d commit db2b055
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions radio/src/targets/pl18/bootloader/boot_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,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)
Expand Down Expand Up @@ -79,30 +74,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);
}
}
_background->drawFilledRect(0, 0, LCD_W, LCD_H, SOLID,
COLOR2FLAGS(BLACK), OPACITY(4));
}

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);
}
}

void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
Expand Down

0 comments on commit db2b055

Please sign in to comment.