Fix #275 Backlight does not get back to MAX brightness after exiting backlight menu entries

Backlight is set to FULL when interacting with backlight menu entries,
but it is not set back to MAX when exiting from those entries. This
commit corrects that behaviour.
This commit is contained in:
Juan Antonio
2023-12-15 02:47:01 +01:00
committed by egzumer
parent a99d2dd1b1
commit cc49a5007c
2 changed files with 10 additions and 0 deletions

View File

@@ -1339,6 +1339,10 @@ static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
if (!gCssBackgroundScan)
{
/* Backlight related menus set full brightness. Set it back to the configured value,
just in case we are exiting from one of them. */
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MAX);
if (gIsInSubMenu)
{
if (gInputBoxIndex == 0 || UI_MENU_GetCurrentMenuId() != MENU_OFFSET)