Removed white screen flash on bootloader start
This commit is contained in:
committed by
Raphael Coeffic
parent
ac84ac1397
commit
3eb109b198
@@ -53,12 +53,7 @@ extern BitmapBuffer * lcd;
|
||||
|
||||
void bootloaderInitScreen()
|
||||
{
|
||||
// Init display first
|
||||
lcdInitDisplayDriver();
|
||||
|
||||
// then backlight
|
||||
backlightInit();
|
||||
backlightEnable(BACKLIGHT_LEVEL_MAX);
|
||||
}
|
||||
|
||||
static void bootloaderDrawTitle(unsigned int x, const char* text)
|
||||
@@ -100,8 +95,15 @@ static void bootloaderDrawBackground()
|
||||
|
||||
void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
{
|
||||
static bool _first_screen = true;
|
||||
|
||||
lcdInitDirectDrawing();
|
||||
bootloaderDrawBackground();
|
||||
|
||||
if (!_first_screen) {
|
||||
// ... and turn backlight ON
|
||||
backlightEnable(BACKLIGHT_LEVEL_MAX);
|
||||
}
|
||||
|
||||
if (st == ST_START) {
|
||||
bootloaderDrawTitle(88, BOOTLOADER_TITLE);
|
||||
@@ -200,6 +202,8 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
lcd->drawText(335, 244, "[RTN] to exit", BL_FOREGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
_first_screen = false;
|
||||
}
|
||||
|
||||
void bootloaderDrawFilename(const char* str, uint8_t line, bool selected)
|
||||
|
||||
@@ -58,12 +58,7 @@ extern BitmapBuffer * lcd;
|
||||
|
||||
void bootloaderInitScreen()
|
||||
{
|
||||
// Init display first
|
||||
lcdInitDisplayDriver();
|
||||
|
||||
// then backlight
|
||||
backlightInit();
|
||||
backlightEnable(BACKLIGHT_LEVEL_MAX);
|
||||
}
|
||||
|
||||
static void bootloaderDrawTitle(const char* text)
|
||||
@@ -105,6 +100,8 @@ static void bootloaderDrawBackground()
|
||||
|
||||
void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
{
|
||||
static bool _first_screen = true;
|
||||
|
||||
lcdInitDirectDrawing();
|
||||
bootloaderDrawBackground();
|
||||
|
||||
@@ -225,6 +222,8 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
LV_SYMBOL_NEW_LINE " [L TRIM] to exit", BL_FOREGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
_first_screen = false;
|
||||
}
|
||||
|
||||
void bootloaderDrawFilename(const char* str, uint8_t line, bool selected)
|
||||
|
||||
Reference in New Issue
Block a user