diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index a0e1cee0d..eee39b631 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -423,8 +423,9 @@ int COsdSetup::showOsdSetup() osd_menu->addItem( new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, osd_menu_chanlist, NULL, CRCInput::RC_2)); //monitor - CScreenPresetNotifier * presetNotify = new CScreenPresetNotifier(); - osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, presetNotify)); + //CScreenPresetNotifier * presetNotify = new CScreenPresetNotifier(); + //osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, presetNotify)); + osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, this)); osd_menu->addItem(GenericMenuSeparatorLine); //options @@ -635,7 +636,7 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist) menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_COLORED_EVENTS, &g_settings.colored_events_channellist, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true)); } -bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/) +bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) { if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS)) return true; @@ -643,6 +644,17 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/ osd_menu->hide(); return true; } + else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_OSD_PRESET)) { + int preset = * (int *) data; + printf("preset %d (setting %d)\n", preset, g_settings.screen_preset); + + g_settings.screen_StartX = g_settings.screen_preset ? g_settings.screen_StartX_lcd : g_settings.screen_StartX_crt; + g_settings.screen_StartY = g_settings.screen_preset ? g_settings.screen_StartY_lcd : g_settings.screen_StartY_crt; + g_settings.screen_EndX = g_settings.screen_preset ? g_settings.screen_EndX_lcd : g_settings.screen_EndX_crt; + g_settings.screen_EndY = g_settings.screen_preset ? g_settings.screen_EndY_lcd : g_settings.screen_EndY_crt; + osd_menu->hide(); + return true; + } return false; } diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 2dd8184f1..dae567f8f 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -1060,6 +1060,7 @@ extern cCpuFreqManager * cpuFreq; return true; } +#if 0 bool CScreenPresetNotifier::changeNotify(const neutrino_locale_t /*OptionName*/, void * data) { int preset = * (int *) data; @@ -1072,7 +1073,7 @@ printf("CScreenPresetNotifier::changeNotify preset %d (setting %d)\n", preset, g CFrameBuffer::getInstance()->Clear(); return true; } - +#endif bool CAllUsalsNotifier::changeNotify(const neutrino_locale_t /*OptionName*/, void * data) { int onoff = * (int *) data; diff --git a/src/system/setting_helpers.h b/src/system/setting_helpers.h index 4d46f46a6..e3abce3fa 100644 --- a/src/system/setting_helpers.h +++ b/src/system/setting_helpers.h @@ -296,12 +296,13 @@ public: bool changeNotify(const neutrino_locale_t, void * data); }; +#if 0 class CScreenPresetNotifier : public CChangeObserver { public: bool changeNotify(const neutrino_locale_t, void * data); }; - +#endif class CAllUsalsNotifier : public CChangeObserver { public: