diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index b3d5171d8..6e1164480 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -354,6 +354,10 @@ colormenu.font_ttx Teletext Schriftart colormenu.menucolors Farben colormenu.osd_preset Monitor Auswahl colormenu.osd_resolution OSD-Auflösung +colormenu.osd_resolution_force OSD-Auflösung erzwingen +colormenu.osd_resolution_force_all in allen Modi +colormenu.osd_resolution_force_hd in HD-Modi +colormenu.osd_resolution_force_never nie colormenu.progressbar_active Farbe des aktiven Teil colormenu.progressbar_passive Hintergrundfarbe colormenu.textcolor Textfarbe @@ -1407,7 +1411,8 @@ menu.hint_opkg_upgrade Aktualisiert alle installierten Pakete auf die neueste ve menu.hint_osd Farben, Schriftarten, Anzeigegröße, Ansichtsoptionen der Menüs usw. menu.hint_osd_language Wählen Sie ihre Menü-Sprache menu.hint_osd_preset Wählen Sie zwischen Röhren-TV (CRT) oder Flachbildschirm (LCD) -menu.hint_osd_resolution Wählen Sie eine OSD Auflösung +menu.hint_osd_resolution Wählen Sie eine OSD-Auflösung +menu.hint_osd_resolution_force Erzwingt die eingestellte OSD-Auflösung, auch wenn das Videosystem automatisch umgeschalten wird menu.hint_osd_timing Einblendzeit, die das OSD auf dem TV angezeigt wird menu.hint_other_fonts Ändern Sie andere Schriftgrößen menu.hint_parentallock_changepin Geben Sie den 4-stelligen PIN-Code ein, der dann ggf. abgefragt wird diff --git a/data/locale/english.locale b/data/locale/english.locale index 1371ccb94..90f9e70e1 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -354,6 +354,10 @@ colormenu.font_ttx Select Teletext font colormenu.menucolors Colors colormenu.osd_preset TV preset colormenu.osd_resolution OSD resolution +colormenu.osd_resolution_force Force OSD resolution +colormenu.osd_resolution_force_all in all modes +colormenu.osd_resolution_force_hd in HD modes +colormenu.osd_resolution_force_never never colormenu.progressbar_active Aktive part color colormenu.progressbar_passive Background colormenu.textcolor Text color @@ -1408,6 +1412,7 @@ menu.hint_osd Colors, fonts, screen size\nGUI look and feel options menu.hint_osd_language Select OSD language menu.hint_osd_preset Pre-configured screen margins for CRT and LCD TV menu.hint_osd_resolution Change OSD resolution +menu.hint_osd_resolution_force Forces the given OSD resolution, even when the videosystem is auto-changed menu.hint_osd_timing After this time the OSD will be faded out menu.hint_other_fonts Change other font sizes menu.hint_parentallock_changepin Change PIN code diff --git a/src/gui/osd_helpers.cpp b/src/gui/osd_helpers.cpp index c4c78ca95..ed257ce49 100644 --- a/src/gui/osd_helpers.cpp +++ b/src/gui/osd_helpers.cpp @@ -58,8 +58,12 @@ void COsdHelpers::changeOsdResolution(uint32_t mode, bool automode/*=false*/, bo } int videoSystem = getVideoSystem(); - if (!isVideoSystem1080(videoSystem)) + + if ((g_settings.video_Mode == VIDEO_STD_AUTO) && + (g_settings.enabled_auto_modes[videoSystem] == 1) && + (!allow_OSDMODE_1080(videoSystem))) modeNew = OSDMODE_720; + idx = frameBuffer->getIndexOsdResolution(modeNew); resetOsd = (modeNew != getOsdResolution()) ? true : false; #if 1 @@ -123,28 +127,28 @@ void COsdHelpers::changeOsdResolution(uint32_t, bool, bool) } #endif -int COsdHelpers::isVideoSystem1080(int res) +bool COsdHelpers::allow_OSDMODE_1080(int res) { - if ((res == VIDEO_STD_1080I60) || - (res == VIDEO_STD_1080I50) || - (res == VIDEO_STD_1080P30) || - (res == VIDEO_STD_1080P24) || - (res == VIDEO_STD_1080P25)) - return true; - + if (g_settings.osd_resolution_force == FORCE_ALL || ( + (res == VIDEO_STD_1080I50) + || (res == VIDEO_STD_1080I60) + || (res == VIDEO_STD_1080P24) + || (res == VIDEO_STD_1080P25) + || (res == VIDEO_STD_1080P30) #ifdef BOXMODEL_CS_HD2 - if ((res == VIDEO_STD_1080P50) || - (res == VIDEO_STD_1080P60) || - (res == VIDEO_STD_1080P2397) || - (res == VIDEO_STD_1080P2997)) - return true; + || (res == VIDEO_STD_1080P50) + || (res == VIDEO_STD_1080P60) + || (res == VIDEO_STD_1080P2397) + || (res == VIDEO_STD_1080P2997) #endif + )) + return true; -#if 0 - /* for testing only */ - if (res == VIDEO_STD_720P50) + if (g_settings.osd_resolution_force == FORCE_HD && ( + (res == VIDEO_STD_720P50) + || (res == VIDEO_STD_720P60) + )) return true; -#endif return false; } diff --git a/src/gui/osd_helpers.h b/src/gui/osd_helpers.h index 9c78886f0..d9fa0c035 100644 --- a/src/gui/osd_helpers.h +++ b/src/gui/osd_helpers.h @@ -19,10 +19,16 @@ class COsdHelpers int g_settings_osd_resolution_save; void changeOsdResolution(uint32_t mode, bool automode=false, bool forceOsdReset=false); - int isVideoSystem1080(int res); + bool allow_OSDMODE_1080(int res); int getVideoSystem(); uint32_t getOsdResolution(); int setVideoSystem(int newSystem, bool remember = true); + + enum { + FORCE_NEVER = 0, + FORCE_HD, + FORCE_ALL + }; }; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index a0fa45688..5bf6523d7 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -406,6 +406,14 @@ const CMenuOptionChooser::keyval_ext OSD_PRESET_OPTIONS[] = { COsdSetup::PRESET_LCD, NONEXISTANT_LOCALE, "LCD" } }; +const CMenuOptionChooser::keyval OSD_RESOLUTION_FORCE_OPTIONS[]= +{ + { COsdHelpers::FORCE_NEVER, LOCALE_COLORMENU_OSD_RESOLUTION_FORCE_NEVER }, + { COsdHelpers::FORCE_HD, LOCALE_COLORMENU_OSD_RESOLUTION_FORCE_HD }, + { COsdHelpers::FORCE_ALL, LOCALE_COLORMENU_OSD_RESOLUTION_FORCE_ALL } +}; +int OSD_RESOLUTION_FORCE_OPTIONS_COUNT = sizeof(OSD_RESOLUTION_FORCE_OPTIONS)/sizeof(OSD_RESOLUTION_FORCE_OPTIONS[0]); + #define INFOBAR_CASYSTEM_MODE_OPTION_COUNT 4 const CMenuOptionChooser::keyval INFOBAR_CASYSTEM_MODE_OPTIONS[INFOBAR_CASYSTEM_MODE_OPTION_COUNT] = { @@ -683,11 +691,17 @@ int COsdSetup::showOsdSetup() } int videoSystem = COsdHelpers::getInstance()->getVideoSystem(); bool enable = ((resCount > 1) && - COsdHelpers::getInstance()->isVideoSystem1080(videoSystem) && + COsdHelpers::getInstance()->allow_OSDMODE_1080(videoSystem) && (g_settings.video_Mode != VIDEO_STD_AUTO)); CMenuOptionChooser * osd_res = new CMenuOptionChooser(LOCALE_COLORMENU_OSD_RESOLUTION, &g_settings.osd_resolution, kext, resCount, enable, this); osd_res->setHint("", LOCALE_MENU_HINT_OSD_RESOLUTION); osd_menu->addItem(osd_res); + + // force resolution in auto-mode + enable = (g_settings.video_Mode == VIDEO_STD_AUTO); + CMenuOptionChooser * osd_res_force = new CMenuOptionChooser(LOCALE_COLORMENU_OSD_RESOLUTION_FORCE, &g_settings.osd_resolution_force, OSD_RESOLUTION_FORCE_OPTIONS, OSD_RESOLUTION_FORCE_OPTIONS_COUNT, enable, this); + osd_res_force->setHint("", LOCALE_MENU_HINT_OSD_RESOLUTION_FORCE); + osd_menu->addItem(osd_res_force); #endif //monitor diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 447afaee9..d2c06bd75 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -782,6 +782,7 @@ int CNeutrinoApp::loadSetup(const char * fname) //screen configuration g_settings.osd_resolution = (osd_resolution_tmp == -1) ? configfile.getInt32("osd_resolution", 0) : osd_resolution_tmp; COsdHelpers::getInstance()->g_settings_osd_resolution_save = g_settings.osd_resolution; + g_settings.osd_resolution_force = configfile.getInt32("osd_resolution_force", COsdHelpers::FORCE_NEVER); g_settings.screen_StartX_crt_0 = configfile.getInt32("screen_StartX_crt_0", 80); g_settings.screen_StartY_crt_0 = configfile.getInt32("screen_StartY_crt_0", 45); g_settings.screen_EndX_crt_0 = configfile.getInt32("screen_EndX_crt_0" , 1280 - g_settings.screen_StartX_crt_0 - 1); @@ -1474,6 +1475,7 @@ void CNeutrinoApp::saveSetup(const char * fname) //screen configuration configfile.setInt32("osd_resolution" , COsdHelpers::getInstance()->g_settings_osd_resolution_save); + configfile.setInt32("osd_resolution_force", g_settings.osd_resolution_force); configfile.setInt32("screen_StartX_lcd_0", g_settings.screen_StartX_lcd_0); configfile.setInt32("screen_StartY_lcd_0", g_settings.screen_StartY_lcd_0); configfile.setInt32("screen_EndX_lcd_0" , g_settings.screen_EndX_lcd_0); diff --git a/src/system/locals.h b/src/system/locals.h index 39b776c88..1e5dd0699 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -381,6 +381,10 @@ typedef enum LOCALE_COLORMENU_MENUCOLORS, LOCALE_COLORMENU_OSD_PRESET, LOCALE_COLORMENU_OSD_RESOLUTION, + LOCALE_COLORMENU_OSD_RESOLUTION_FORCE, + LOCALE_COLORMENU_OSD_RESOLUTION_FORCE_ALL, + LOCALE_COLORMENU_OSD_RESOLUTION_FORCE_HD, + LOCALE_COLORMENU_OSD_RESOLUTION_FORCE_NEVER, LOCALE_COLORMENU_PROGRESSBAR_ACTIVE, LOCALE_COLORMENU_PROGRESSBAR_PASSIVE, LOCALE_COLORMENU_TEXTCOLOR, @@ -1435,6 +1439,7 @@ typedef enum LOCALE_MENU_HINT_OSD_LANGUAGE, LOCALE_MENU_HINT_OSD_PRESET, LOCALE_MENU_HINT_OSD_RESOLUTION, + LOCALE_MENU_HINT_OSD_RESOLUTION_FORCE, LOCALE_MENU_HINT_OSD_TIMING, LOCALE_MENU_HINT_OTHER_FONTS, LOCALE_MENU_HINT_PARENTALLOCK_CHANGEPIN, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 3e4fa363f..bd670644f 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -381,6 +381,10 @@ const char * locale_real_names[] = "colormenu.menucolors", "colormenu.osd_preset", "colormenu.osd_resolution", + "colormenu.osd_resolution_force", + "colormenu.osd_resolution_force_all", + "colormenu.osd_resolution_force_hd", + "colormenu.osd_resolution_force_never", "colormenu.progressbar_active", "colormenu.progressbar_passive", "colormenu.textcolor", @@ -1435,6 +1439,7 @@ const char * locale_real_names[] = "menu.hint_osd_language", "menu.hint_osd_preset", "menu.hint_osd_resolution", + "menu.hint_osd_resolution_force", "menu.hint_osd_timing", "menu.hint_other_fonts", "menu.hint_parentallock_changepin", diff --git a/src/system/settings.h b/src/system/settings.h index ffa3ae1ef..2ae1b9b6d 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -643,6 +643,7 @@ struct SNeutrinoSettings int screen_EndX_lcd_1; int screen_EndY_lcd_1; int osd_resolution; + int osd_resolution_force; int screen_preset; int screen_width; int screen_height;