From e7d1a446936dd0eca61f43d6b922fd7aa34a4e42 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sun, 12 Mar 2017 06:32:52 +0100 Subject: [PATCH] Revert "- allow to force given osd resolution in "videosystem = auto" mode" This reverts commit f3fe4a116f92b0722fee7c0aaa315e0b73c0729d. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5ce34d5cf95bd496a59ba9dd23aeddb35a5746d7 Author: Michael Liebmann Date: 2017-03-12 (Sun, 12 Mar 2017) ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 7 +------ data/locale/english.locale | 5 ----- src/gui/osd_helpers.cpp | 41 ++++++++++++++++++++------------------ src/gui/osd_helpers.h | 8 +------- src/gui/osd_setup.cpp | 16 +-------------- src/neutrino.cpp | 2 -- src/system/locals.h | 5 ----- src/system/locals_intern.h | 5 ----- src/system/settings.h | 1 - 9 files changed, 25 insertions(+), 65 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index bec07ffea..5b9c45c61 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -325,10 +325,6 @@ 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.textcolor Textfarbe colormenu.themeselect Theme auswählen colormenu.timing Timeouts @@ -1256,8 +1252,7 @@ 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_force Erzwingt die eingestellte OSD-Auflösung, auch wenn das Videosystem automatisch umgeschalten wird +menu.hint_osd_resolution Wählen Sie eine OSD Auflösung 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 b568e7b53..d8d2fbe20 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -325,10 +325,6 @@ 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.textcolor Text color colormenu.themeselect Select theme colormenu.timing Timeouts @@ -1257,7 +1253,6 @@ 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 ed257ce49..2675cffef 100644 --- a/src/gui/osd_helpers.cpp +++ b/src/gui/osd_helpers.cpp @@ -61,9 +61,12 @@ void COsdHelpers::changeOsdResolution(uint32_t mode, bool automode/*=false*/, bo if ((g_settings.video_Mode == VIDEO_STD_AUTO) && (g_settings.enabled_auto_modes[videoSystem] == 1) && - (!allow_OSDMODE_1080(videoSystem))) + (!isVideoSystem1080(videoSystem))) modeNew = OSDMODE_720; +// if (!isVideoSystem1080(videoSystem)) +// modeNew = OSDMODE_720; + idx = frameBuffer->getIndexOsdResolution(modeNew); resetOsd = (modeNew != getOsdResolution()) ? true : false; #if 1 @@ -127,28 +130,28 @@ void COsdHelpers::changeOsdResolution(uint32_t, bool, bool) } #endif -bool COsdHelpers::allow_OSDMODE_1080(int res) +int COsdHelpers::isVideoSystem1080(int res) { - 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 - || (res == VIDEO_STD_1080P50) - || (res == VIDEO_STD_1080P60) - || (res == VIDEO_STD_1080P2397) - || (res == VIDEO_STD_1080P2997) -#endif - )) + 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_HD && ( - (res == VIDEO_STD_720P50) - || (res == VIDEO_STD_720P60) - )) +#ifdef BOXMODEL_CS_HD2 + if ((res == VIDEO_STD_1080P50) || + (res == VIDEO_STD_1080P60) || + (res == VIDEO_STD_1080P2397) || + (res == VIDEO_STD_1080P2997)) return true; +#endif + +#if 0 + /* for testing only */ + if (res == VIDEO_STD_720P50) + return true; +#endif return false; } diff --git a/src/gui/osd_helpers.h b/src/gui/osd_helpers.h index d9fa0c035..9c78886f0 100644 --- a/src/gui/osd_helpers.h +++ b/src/gui/osd_helpers.h @@ -19,16 +19,10 @@ class COsdHelpers int g_settings_osd_resolution_save; void changeOsdResolution(uint32_t mode, bool automode=false, bool forceOsdReset=false); - bool allow_OSDMODE_1080(int res); + int isVideoSystem1080(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 9e8b9db00..281999311 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -397,14 +397,6 @@ 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] = { @@ -670,17 +662,11 @@ int COsdSetup::showOsdSetup() } int videoSystem = COsdHelpers::getInstance()->getVideoSystem(); bool enable = ((resCount > 1) && - COsdHelpers::getInstance()->allow_OSDMODE_1080(videoSystem) && + COsdHelpers::getInstance()->isVideoSystem1080(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 67ff7e77e..fb9c3eeaa 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -726,7 +726,6 @@ 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); @@ -1368,7 +1367,6 @@ 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 3ddb368d7..b39748482 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -352,10 +352,6 @@ 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_TEXTCOLOR, LOCALE_COLORMENU_THEMESELECT, LOCALE_COLORMENU_TIMING, @@ -1284,7 +1280,6 @@ 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 0f327937a..b39ca2c98 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -352,10 +352,6 @@ 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.textcolor", "colormenu.themeselect", "colormenu.timing", @@ -1284,7 +1280,6 @@ 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 70c23c731..3a063669e 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -626,7 +626,6 @@ 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;