lcd4l: prepare to simplify lcd4linux.conf

Based upon
84fc9cea29
and
3d6eb88716
but in a much simple way.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 7d695d4fea
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-02-17 (Thu, 17 Feb 2022)

Origin message was:
------------------
- lcd4l: prepare to simplify lcd4linux.conf

Based upon
84fc9cea29
and
3d6eb88716
but in a much simple way.


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2022-02-17 22:30:19 +01:00
parent e34d754347
commit 36a8b78085

View File

@@ -859,60 +859,75 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
/* --- */
std::string DisplayType;
std::string DisplayDriver;
std::string DisplayRes;
switch (g_settings.lcd4l_display_type)
{
case SPF800x480:
DisplayType = "Samsung800x480_";
DisplayDriver = "Samsung";
DisplayRes = "800x480";
break;
case SPF800x600:
DisplayType = "Samsung800x600_";
DisplayDriver = "Samsung";
DisplayRes = "800x600";
break;
case SPF1024x600:
DisplayType = "Samsung1024x600_";
DisplayDriver = "Samsung";
DisplayRes = "1024x600";
break;
case DPF320x240:
default:
DisplayType = "Pearl_";
DisplayDriver = "Pearl";
DisplayRes = "320x240";
break;
}
std::string Layout;
std::string DisplayType = DisplayDriver + DisplayRes;
// Workaround for DPF
if (g_settings.lcd4l_display_type == DPF320x240)
DisplayType = DisplayDriver;
std::string DisplayMode;
if (ModeStandby)
{
Layout = DisplayType + "standby";
DisplayMode = "standby";
}
else if ((g_settings.lcd4l_skin_radio) && (m_Mode == NeutrinoModes::mode_radio || m_Mode == NeutrinoModes::mode_webradio))
{
Layout = DisplayType + "radio";
DisplayMode = "radio";
}
else
{
switch (g_settings.lcd4l_skin)
{
case 100:
Layout = DisplayType + "user";
DisplayMode = "user";
break;
case 4:
Layout = DisplayType + "xcam";
DisplayMode = "xcam";
break;
case 3:
Layout = DisplayType + "d-box2";
DisplayMode = "d-box2";
break;
case 2:
Layout = DisplayType + "small";
DisplayMode = "small";
break;
case 1:
Layout = DisplayType + "large";
DisplayMode = "large";
break;
case 0:
default:
Layout = DisplayType + "standard";
DisplayMode = "standard";
}
}
std::string Layout = DisplayType + "_" + DisplayMode;
Layout += "\n" + DisplayDriver;
Layout += "\n" + DisplayRes;
Layout += "\n" + DisplayMode;
if (m_Layout.compare(Layout))
{
WriteFile(LAYOUT, Layout);