lcd4l-setup: restart lcd after brightness change

Origin commit data
------------------
Branch: ni/coolstream
Commit: ab8a9b2aaa
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-09-10 (Mon, 10 Sep 2018)

Origin message was:
------------------
- lcd4l-setup: restart lcd after brightness change

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2018-09-10 00:15:22 +02:00
parent 21b0c4839f
commit 886e45ef73

View File

@@ -133,6 +133,7 @@ int CLCD4lSetup::show()
int temp_lcd4l_display_type = g_settings.lcd4l_display_type;
int temp_lcd4l_skin = g_settings.lcd4l_skin;
int temp_lcd4l_brightness = g_settings.lcd4l_brightness;
// lcd4l setup
CMenuWidget* lcd4lSetup = new CMenuWidget(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_LCD4L_SETUP);
@@ -159,7 +160,7 @@ int CLCD4lSetup::show()
mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_SKIN_RADIO);
lcd4lSetup->addItem(mc);
nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS, (int *)&g_settings.lcd4l_brightness, true, 1, 7, this);
nc = new CMenuOptionNumberChooser(LOCALE_LCD4L_BRIGHTNESS, (int *)&temp_lcd4l_brightness, true, 1, 7, this);
nc->setHint("", LOCALE_MENU_HINT_LCD4L_BRIGHTNESS);
lcd4lSetup->addItem(nc);
@@ -196,17 +197,28 @@ int CLCD4lSetup::show()
// the things to do on exit
bool initlcd4l = false;
if (g_settings.lcd4l_display_type != temp_lcd4l_display_type)
{
g_settings.lcd4l_display_type = temp_lcd4l_display_type;
LCD4l->InitLCD4l();
initlcd4l = true;
}
if (g_settings.lcd4l_skin != temp_lcd4l_skin)
{
g_settings.lcd4l_skin = temp_lcd4l_skin;
LCD4l->InitLCD4l();
initlcd4l = true;
}
if (g_settings.lcd4l_brightness != temp_lcd4l_brightness)
{
g_settings.lcd4l_brightness = temp_lcd4l_brightness;
initlcd4l = true;
}
if (initlcd4l)
LCD4l->InitLCD4l();
return res;
}