Fix backlight issue when storage is erased

and crash on PWR button press while a full-screen dialog is displayed.
This commit is contained in:
Raphael Coeffic
2021-05-26 16:08:12 +02:00
parent 945fc9510a
commit 038b8364f6
2 changed files with 11 additions and 2 deletions
+8 -1
View File
@@ -39,11 +39,18 @@ void storageEraseAll(bool warn)
{
TRACE("storageEraseAll");
#if defined(LIBOPENUI)
#if defined(COLORLCD)
// the theme has not been loaded before
static_cast<OpenTxTheme*>(theme)->load();
#endif
// Init backlight mode before entering alert screens
requiredBacklightBright = BACKLIGHT_FORCED_ON;
#if defined(PCBHORUS)
g_eeGeneral.blOffBright = 20;
#endif
if (warn) {
ALERT(STR_STORAGE_WARNING, STR_BAD_RADIO_DATA, AU_BAD_RADIODATA);
}