mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
lcd4l: use better readable enumeration to handle g_settings.lcd4l_display_type
Origin commit data
------------------
Branch: ni/coolstream
Commit: 3598a95c3d
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-09-10 (Mon, 10 Sep 2018)
Origin message was:
------------------
- lcd4l: use better readable enumeration to handle g_settings.lcd4l_display_type
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -665,45 +665,47 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
||||
|
||||
/* --- */
|
||||
|
||||
std::string Layout;
|
||||
std::string DisplayType;
|
||||
|
||||
std::string DISPLAY_Type;
|
||||
switch (g_settings.lcd4l_display_type) {
|
||||
case 1:
|
||||
DISPLAY_Type = "Samsung_";
|
||||
switch (g_settings.lcd4l_display_type)
|
||||
{
|
||||
case SAMSUNG:
|
||||
DisplayType = "Samsung_";
|
||||
break;
|
||||
case 0:
|
||||
case PEARL:
|
||||
default:
|
||||
DISPLAY_Type = "Pearl_";
|
||||
DisplayType = "Pearl_";
|
||||
break;
|
||||
}
|
||||
|
||||
std::string Layout;
|
||||
|
||||
if (ModeStandby)
|
||||
{
|
||||
Layout = DISPLAY_Type + "standby";
|
||||
Layout = DisplayType + "standby";
|
||||
}
|
||||
else if ((g_settings.lcd4l_skin_radio) && (m_Mode == NeutrinoModes::mode_radio || m_Mode == NeutrinoModes::mode_webradio))
|
||||
{
|
||||
Layout = DISPLAY_Type + "radio";
|
||||
Layout = DisplayType + "radio";
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (g_settings.lcd4l_skin)
|
||||
{
|
||||
case 4:
|
||||
Layout = DISPLAY_Type + "user";
|
||||
Layout = DisplayType + "user";
|
||||
break;
|
||||
case 3:
|
||||
Layout = DISPLAY_Type + "d-box2";
|
||||
Layout = DisplayType + "d-box2";
|
||||
break;
|
||||
case 2:
|
||||
Layout = DISPLAY_Type + "small";
|
||||
Layout = DisplayType + "small";
|
||||
break;
|
||||
case 1:
|
||||
Layout = DISPLAY_Type + "large";
|
||||
Layout = DisplayType + "large";
|
||||
break;
|
||||
default:
|
||||
Layout = DISPLAY_Type + "standard";
|
||||
Layout = DisplayType + "standard";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -935,7 +937,7 @@ bool CLCD4l::WriteFile(const char *file, std::string content, bool convert)
|
||||
strReplace(content, "Ä", "\xc4\0");
|
||||
strReplace(content, "Ö", "\xd6\0");
|
||||
strReplace(content, "Ü", "\xdc\0");
|
||||
if (g_settings.lcd4l_display_type == 0) strReplace(content, "ß", "\xe2\0");
|
||||
if (g_settings.lcd4l_display_type == PEARL) strReplace(content, "ß", "\xe2\0");
|
||||
strReplace(content, "é", "e");
|
||||
}
|
||||
|
||||
|
@@ -38,6 +38,13 @@ class CLCD4l
|
||||
CLCD4l();
|
||||
~CLCD4l();
|
||||
|
||||
// Displays
|
||||
enum
|
||||
{
|
||||
PEARL = 0,
|
||||
SAMSUNG = 1
|
||||
};
|
||||
|
||||
// Functions
|
||||
void InitLCD4l();
|
||||
void StartLCD4l();
|
||||
|
@@ -65,8 +65,8 @@ const CMenuOptionChooser::keyval LCD4L_SUPPORT_OPTIONS[] =
|
||||
|
||||
const CMenuOptionChooser::keyval_ext LCD4L_DISPLAY_TYPE_OPTIONS[] =
|
||||
{
|
||||
{ 0, NONEXISTANT_LOCALE, "Pearl"},
|
||||
{ 1, NONEXISTANT_LOCALE, "Samsung"}
|
||||
{ CLCD4l::PEARL, NONEXISTANT_LOCALE, "Pearl"},
|
||||
{ CLCD4l::SAMSUNG, NONEXISTANT_LOCALE, "Samsung"}
|
||||
};
|
||||
#define LCD4L_DISPLAY_TYPE_OPTION_COUNT (sizeof(LCD4L_DISPLAY_TYPE_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext))
|
||||
|
||||
|
Reference in New Issue
Block a user