lcd4linux: add display type

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


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

------------------
This commit was generated by Migit
This commit is contained in:
max_10
2018-09-10 00:15:21 +02:00
committed by vanhofen
parent d6ea2ad570
commit 62ea389882
8 changed files with 53 additions and 16 deletions

View File

@@ -63,6 +63,13 @@ const CMenuOptionChooser::keyval LCD4L_SUPPORT_OPTIONS[] =
};
#define LCD4L_SUPPORT_OPTION_COUNT (sizeof(LCD4L_SUPPORT_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
const CMenuOptionChooser::keyval_ext LCD4L_DISPLAY_TYPE_OPTIONS[] =
{
{ 0, NONEXISTANT_LOCALE, "Pearl"},
{ 1, NONEXISTANT_LOCALE, "Samsung"}
};
#define LCD4L_DISPLAY_TYPE_OPTION_COUNT (sizeof(LCD4L_DISPLAY_TYPE_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext))
const CMenuOptionChooser::keyval LCD4L_SKIN_OPTIONS[] =
{
{ 0, LOCALE_LCD4L_SKIN_0 },
@@ -124,7 +131,8 @@ int CLCD4lSetup::show()
{
int shortcut = 1;
int temp_lcd4l_skin = g_settings.lcd4l_skin;
int temp_lcd4l_display_type = g_settings.lcd4l_display_type;
int temp_lcd4l_skin = g_settings.lcd4l_skin;
// lcd4l setup
CMenuWidget* lcd4lSetup = new CMenuWidget(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_LCD4L_SETUP);
@@ -139,6 +147,10 @@ int CLCD4lSetup::show()
mf->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_LOGODIR);
lcd4lSetup->addItem(mf);
mc = new CMenuOptionChooser(LOCALE_LCD4L_DISPLAY_TYPE, &temp_lcd4l_display_type, LCD4L_DISPLAY_TYPE_OPTIONS, LCD4L_DISPLAY_TYPE_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++));
// mc->setHint("", LOCALE_MENU_HINT_LCD4L_DISPLAY_TYPE);
lcd4lSetup->addItem(mc);
mc = new CMenuOptionChooser(LOCALE_LCD4L_SKIN, &temp_lcd4l_skin, LCD4L_SKIN_OPTIONS, LCD4L_SKIN_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++));
mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_SKIN);
lcd4lSetup->addItem(mc);
@@ -176,6 +188,12 @@ int CLCD4lSetup::show()
// the things to do on exit
if (g_settings.lcd4l_display_type != temp_lcd4l_display_type)
{
g_settings.lcd4l_display_type = temp_lcd4l_display_type;
LCD4l->InitLCD4l();
}
if (g_settings.lcd4l_skin != temp_lcd4l_skin)
{
g_settings.lcd4l_skin = temp_lcd4l_skin;