diff --git a/src/driver/lcd4l.cpp b/src/driver/lcd4l.cpp index fba1ce9df..3180f8115 100644 --- a/src/driver/lcd4l.cpp +++ b/src/driver/lcd4l.cpp @@ -119,7 +119,7 @@ static void lcd4linux(bool run) if (run == true) { - if (g_settings.lcd4l_dpf_type == CLCD4l::PNG) + if (g_settings.lcd4l_display_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); @@ -227,7 +227,7 @@ int CLCD4l::GetMaxBrightness() { int max_brightness; - switch (g_settings.lcd4l_dpf_type) + switch (g_settings.lcd4l_display_type) { case SAMSUNG: case VUSOLO4K: @@ -763,41 +763,41 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) std::string Layout; - std::string DPF_Type; - switch (g_settings.lcd4l_dpf_type) { + std::string DisplayType; + switch (g_settings.lcd4l_display_type) { case 3: - DPF_Type = "PNG_"; + DisplayType = "PNG_"; break; #if defined BOXMODEL_VUSOLO4K case 2: - DPF_Type = "VUSolo4K_"; + DisplayType = "VUSolo4K_"; break; #endif case 1: - DPF_Type = "Samsung_"; + DisplayType = "Samsung_"; break; case 0: default: - DPF_Type = "Pearl_"; + DisplayType = "Pearl_"; break; } switch (g_settings.lcd4l_skin) { case 4: - Layout = DPF_Type + "user04"; + Layout = DisplayType + "user04"; break; case 3: - Layout = DPF_Type + "user03"; + Layout = DisplayType + "user03"; break; case 2: - Layout = DPF_Type + "user02"; + Layout = DisplayType + "user02"; break; case 1: - Layout = DPF_Type + "user01"; + Layout = DisplayType + "user01"; break; default: - Layout = DPF_Type + "standard"; + Layout = DisplayType + "standard"; } if (ModeStandby) @@ -1044,7 +1044,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 == PEARL) strReplace(content, "ß", "\xe2\0"); + if (g_settings.lcd4l_display_type == PEARL) strReplace(content, "ß", "\xe2\0"); strReplace(content, "é", "e"); } diff --git a/src/gui/lcd4l_setup.cpp b/src/gui/lcd4l_setup.cpp index e3420e67f..91bb98ef3 100644 --- a/src/gui/lcd4l_setup.cpp +++ b/src/gui/lcd4l_setup.cpp @@ -64,7 +64,7 @@ const CMenuOptionChooser::keyval LCD4L_SUPPORT_OPTIONS[] = }; #define LCD4L_SUPPORT_OPTION_COUNT (sizeof(LCD4L_SUPPORT_OPTIONS)/sizeof(CMenuOptionChooser::keyval)) -const CMenuOptionChooser::keyval_ext LCD4L_DPF_TYPE_OPTIONS[] = +const CMenuOptionChooser::keyval_ext LCD4L_DISPLAY_TYPE_OPTIONS[] = { { CLCD4l::PEARL, NONEXISTANT_LOCALE, "Pearl"}, { CLCD4l::SAMSUNG, NONEXISTANT_LOCALE, "Samsung"}, @@ -73,7 +73,7 @@ const CMenuOptionChooser::keyval_ext LCD4L_DPF_TYPE_OPTIONS[] = #endif { CLCD4l::PNG, NONEXISTANT_LOCALE, "PNG"} }; -#define LCD4L_DPF_TYPE_OPTION_COUNT (sizeof(LCD4L_DPF_TYPE_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext)) +#define LCD4L_DISPLAY_TYPE_OPTION_COUNT (sizeof(LCD4L_DISPLAY_TYPE_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext)) const CMenuOptionChooser::keyval LCD4L_SKIN_OPTIONS[] = { @@ -146,7 +146,7 @@ int CLCD4lSetup::show() { int shortcut = 1; - int temp_lcd4l_dpf_type = g_settings.lcd4l_dpf_type; + 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; @@ -163,7 +163,7 @@ int CLCD4lSetup::show() mf->setHint(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_LOGODIR); lcd4lSetup->addItem(mf); - mc = new CMenuOptionChooser(LOCALE_LCD4L_DISPLAY_TYPE, &temp_lcd4l_dpf_type, LCD4L_DPF_TYPE_OPTIONS, LCD4L_DPF_TYPE_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); + 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(NEUTRINO_ICON_HINT_LCD4LINUX, LOCALE_MENU_HINT_LCD4L_DISPLAY_TYPE); lcd4lSetup->addItem(mc); @@ -205,23 +205,28 @@ int CLCD4lSetup::show() delete lcd4lSetup; // the things to do on exit - bool need_init = false; - if (g_settings.lcd4l_dpf_type != temp_lcd4l_dpf_type) + + bool initlcd4l = false; + + if (g_settings.lcd4l_display_type != temp_lcd4l_display_type) { - g_settings.lcd4l_dpf_type = temp_lcd4l_dpf_type; - need_init = true; + g_settings.lcd4l_display_type = temp_lcd4l_display_type; + initlcd4l = true; } + if (g_settings.lcd4l_skin != temp_lcd4l_skin) { g_settings.lcd4l_skin = temp_lcd4l_skin; - need_init = true; + initlcd4l = true; } + if (g_settings.lcd4l_brightness != temp_lcd4l_brightness) { g_settings.lcd4l_brightness = temp_lcd4l_brightness; - need_init = true; + initlcd4l = true; } - if (need_init) + + if (initlcd4l) LCD4l->InitLCD4l(); return res; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a4a76b261..4e542f758 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -363,7 +363,7 @@ int CNeutrinoApp::loadSetup(const char * fname) #ifdef ENABLE_LCD4LINUX g_settings.lcd4l_support = configfile.getInt32("lcd4l_support" , 0); g_settings.lcd4l_logodir = configfile.getString("lcd4l_logodir", LOGODIR); - g_settings.lcd4l_dpf_type = configfile.getInt32("lcd4l_dpf_type", 0); + g_settings.lcd4l_display_type = configfile.getInt32("lcd4l_display_type", 0); g_settings.lcd4l_skin = configfile.getInt32("lcd4l_skin" , 0); g_settings.lcd4l_skin_radio = configfile.getInt32("lcd4l_skin_radio" , 0); g_settings.lcd4l_brightness = configfile.getInt32("lcd4l_brightness", 7); @@ -1238,7 +1238,7 @@ void CNeutrinoApp::saveSetup(const char * fname) #ifdef ENABLE_LCD4LINUX configfile.setInt32("lcd4l_support" , g_settings.lcd4l_support); configfile.setString("lcd4l_logodir" , g_settings.lcd4l_logodir); - configfile.setInt32("lcd4l_dpf_type" , g_settings.lcd4l_dpf_type); + configfile.setInt32("lcd4l_display_type" , g_settings.lcd4l_display_type); configfile.setInt32("lcd4l_skin" , g_settings.lcd4l_skin); configfile.setInt32("lcd4l_skin_radio" , g_settings.lcd4l_skin_radio); configfile.setInt32("lcd4l_brightness", g_settings.lcd4l_brightness); diff --git a/src/system/settings.h b/src/system/settings.h index 025275d8c..23b632ce0 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -770,7 +770,7 @@ struct SNeutrinoSettings std::string lcd4l_logodir; int lcd4l_brightness; int lcd4l_brightness_standby; - int lcd4l_dpf_type; + int lcd4l_display_type; int lcd4l_skin; int lcd4l_skin_radio; int lcd4l_convert;