l4l: use more enums

This commit is contained in:
GetAway
2019-01-03 17:02:04 +01:00
parent 6948dc1d78
commit 451de1c00b
3 changed files with 8 additions and 7 deletions

View File

@@ -120,7 +120,7 @@ static void lcd4linux(bool run)
if (run == true)
{
if (g_settings.lcd4l_dpf_type == 3)
if (g_settings.lcd4l_dpf_type == CLCD4l::PNG)
{
if (my_system(3, lcd4linux.c_str(), "-o", PNGFILE) != 0)
printf("[CLCD4l] %s: executing '%s -o %s' failed\n", __FUNCTION__, lcd4linux.c_str(), PNGFILE);
@@ -1045,7 +1045,7 @@ bool CLCD4l::WriteFile(const char *file, std::string content, bool convert)
strReplace(content, "Ź", "\x5a\0");
strReplace(content, "ż", "\x7a\0");
if (g_settings.lcd4l_dpf_type == 0) strReplace(content, "ß", "\xe2\0");
if (g_settings.lcd4l_dpf_type == PEARL) strReplace(content, "ß", "\xe2\0");
strReplace(content, "é", "e");
}

View File

@@ -43,7 +43,8 @@ class CLCD4l
{
PEARL = 0,
SAMSUNG = 1,
VUSOLO4K = 2
VUSOLO4K = 2,
PNG = 3
};
// Functions

View File

@@ -66,12 +66,12 @@ const CMenuOptionChooser::keyval LCD4L_SUPPORT_OPTIONS[] =
const CMenuOptionChooser::keyval_ext LCD4L_DPF_TYPE_OPTIONS[] =
{
{ 0, NONEXISTANT_LOCALE, "Pearl"},
{ 1, NONEXISTANT_LOCALE, "Samsung"},
{ CLCD4l::PEARL, NONEXISTANT_LOCALE, "Pearl"},
{ CLCD4l::SAMSUNG, NONEXISTANT_LOCALE, "Samsung"},
#if defined BOXMODEL_VUSOLO4K
{ 2, NONEXISTANT_LOCALE, "VUSolo4K"},
{ CLCD4l::VUSOLO4K, NONEXISTANT_LOCALE, "VUSolo4K"},
#endif
{ 3, NONEXISTANT_LOCALE, "PNG"}
{ CLCD4l::PNG, NONEXISTANT_LOCALE, "PNG"}
};
#define LCD4L_DPF_TYPE_OPTION_COUNT (sizeof(LCD4L_DPF_TYPE_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext))