From 3ec296ec602fec5411c6ffeb69746144009c0837 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Wed, 31 Mar 2021 22:15:28 +0200 Subject: [PATCH] - unify new presets; part 2 Signed-off-by: Thilo Graf --- src/gui/screensetup.cpp | 32 ++++++------ src/neutrino.cpp | 112 ++++++++++++++++++++-------------------- src/system/settings.h | 32 ++++++------ 3 files changed, 88 insertions(+), 88 deletions(-) diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index 4add79391..6d7329657 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -120,17 +120,17 @@ int CScreenSetup::exec(CMenuTarget* parent, const std::string &) { switch (g_settings.screen_preset) { case COsdSetup::PRESET_SCREEN_B: - g_settings.screen_StartX_lcd_b_1 = g_settings.screen_StartX; - g_settings.screen_StartY_lcd_b_1 = g_settings.screen_StartY; - g_settings.screen_EndX_lcd_b_1 = g_settings.screen_EndX; - g_settings.screen_EndY_lcd_b_1 = g_settings.screen_EndY; + g_settings.screen_StartX_b_1 = g_settings.screen_StartX; + g_settings.screen_StartY_b_1 = g_settings.screen_StartY; + g_settings.screen_EndX_b_1 = g_settings.screen_EndX; + g_settings.screen_EndY_b_1 = g_settings.screen_EndY; break; case COsdSetup::PRESET_SCREEN_A: default: - g_settings.screen_StartX_lcd_a_1 = g_settings.screen_StartX; - g_settings.screen_StartY_lcd_a_1 = g_settings.screen_StartY; - g_settings.screen_EndX_lcd_a_1 = g_settings.screen_EndX; - g_settings.screen_EndY_lcd_a_1 = g_settings.screen_EndY; + g_settings.screen_StartX_a_1 = g_settings.screen_StartX; + g_settings.screen_StartY_a_1 = g_settings.screen_StartY; + g_settings.screen_EndX_a_1 = g_settings.screen_EndX; + g_settings.screen_EndY_a_1 = g_settings.screen_EndY; break; } } @@ -141,17 +141,17 @@ int CScreenSetup::exec(CMenuTarget* parent, const std::string &) { switch (g_settings.screen_preset) { case COsdSetup::PRESET_SCREEN_B: - g_settings.screen_StartX_lcd_b_0 = g_settings.screen_StartX; - g_settings.screen_StartY_lcd_b_0 = g_settings.screen_StartY; - g_settings.screen_EndX_lcd_b_0 = g_settings.screen_EndX; - g_settings.screen_EndY_lcd_b_0 = g_settings.screen_EndY; + g_settings.screen_StartX_b_0 = g_settings.screen_StartX; + g_settings.screen_StartY_b_0 = g_settings.screen_StartY; + g_settings.screen_EndX_b_0 = g_settings.screen_EndX; + g_settings.screen_EndY_b_0 = g_settings.screen_EndY; break; case COsdSetup::PRESET_SCREEN_A: default: - g_settings.screen_StartX_lcd_a_0 = g_settings.screen_StartX; - g_settings.screen_StartY_lcd_a_0 = g_settings.screen_StartY; - g_settings.screen_EndX_lcd_a_0 = g_settings.screen_EndX; - g_settings.screen_EndY_lcd_a_0 = g_settings.screen_EndY; + g_settings.screen_StartX_a_0 = g_settings.screen_StartX; + g_settings.screen_StartY_a_0 = g_settings.screen_StartY; + g_settings.screen_EndX_a_0 = g_settings.screen_EndX; + g_settings.screen_EndY_a_0 = g_settings.screen_EndY; break; } } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 762ae1e1e..39ed4288c 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -937,24 +937,24 @@ int CNeutrinoApp::loadSetup(const char * fname) COsdHelpers::getInstance()->g_settings_osd_resolution_save = g_settings.osd_resolution; // default for fullpixel - g_settings.screen_StartX_lcd_a_0 = configfile.getInt32("screen_StartX_lcd_a_0", 0); - g_settings.screen_StartY_lcd_a_0 = configfile.getInt32("screen_StartY_lcd_a_0", 0); - g_settings.screen_EndX_lcd_a_0 = configfile.getInt32("screen_EndX_lcd_a_0" , 1280 - g_settings.screen_StartX_lcd_a_0 - 1); - g_settings.screen_EndY_lcd_a_0 = configfile.getInt32("screen_EndY_lcd_a_0" , 720 - g_settings.screen_StartY_lcd_a_0 - 1); - g_settings.screen_StartX_lcd_a_1 = configfile.getInt32("screen_StartX_lcd_a_1", 0); - g_settings.screen_StartY_lcd_a_1 = configfile.getInt32("screen_StartY_lcd_a_1", 0); - g_settings.screen_EndX_lcd_a_1 = configfile.getInt32("screen_EndX_lcd_a_1" , 1920 - g_settings.screen_StartX_lcd_a_1 - 1); - g_settings.screen_EndY_lcd_a_1 = configfile.getInt32("screen_EndY_lcd_a_1" , 1080 - g_settings.screen_StartY_lcd_a_1 - 1); + g_settings.screen_StartX_a_0 = configfile.getInt32("screen_StartX_a_0", 0); + g_settings.screen_StartY_a_0 = configfile.getInt32("screen_StartY_a_0", 0); + g_settings.screen_EndX_a_0 = configfile.getInt32("screen_EndX_a_0" , 1280 - g_settings.screen_StartX_a_0 - 1); + g_settings.screen_EndY_a_0 = configfile.getInt32("screen_EndY_a_0" , 720 - g_settings.screen_StartY_a_0 - 1); + g_settings.screen_StartX_a_1 = configfile.getInt32("screen_StartX_a_1", 0); + g_settings.screen_StartY_a_1 = configfile.getInt32("screen_StartY_a_1", 0); + g_settings.screen_EndX_a_1 = configfile.getInt32("screen_EndX_a_1" , 1920 - g_settings.screen_StartX_a_1 - 1); + g_settings.screen_EndY_a_1 = configfile.getInt32("screen_EndY_a_1" , 1080 - g_settings.screen_StartY_a_1 - 1); // default for non fullpixel - g_settings.screen_StartX_lcd_b_0 = configfile.getInt32("screen_StartX_lcd_b_0", 22); - g_settings.screen_StartY_lcd_b_0 = configfile.getInt32("screen_StartY_lcd_b_0", 12); - g_settings.screen_EndX_lcd_b_0 = configfile.getInt32("screen_EndX_lcd_b_0" , 1259 - g_settings.screen_StartX_lcd_b_0 - 1); - g_settings.screen_EndY_lcd_b_0 = configfile.getInt32("screen_EndY_lcd_b_0" , 708 - g_settings.screen_StartY_lcd_b_0 - 1); - g_settings.screen_StartX_lcd_b_1 = configfile.getInt32("screen_StartX_lcd_b_1", 33); - g_settings.screen_StartY_lcd_b_1 = configfile.getInt32("screen_StartY_lcd_b_1", 18); - g_settings.screen_EndX_lcd_b_1 = configfile.getInt32("screen_EndX_lcd_b_1" , 1888 - g_settings.screen_StartX_lcd_b_1 - 1); - g_settings.screen_EndY_lcd_b_1 = configfile.getInt32("screen_EndY_lcd_b_1" , 1062 - g_settings.screen_StartY_lcd_b_1 - 1); + g_settings.screen_StartX_b_0 = configfile.getInt32("screen_StartX_b_0", 22); + g_settings.screen_StartY_b_0 = configfile.getInt32("screen_StartY_b_0", 12); + g_settings.screen_EndX_b_0 = configfile.getInt32("screen_EndX_b_0" , 1259 - g_settings.screen_StartX_b_0 - 1); + g_settings.screen_EndY_b_0 = configfile.getInt32("screen_EndY_b_0" , 708 - g_settings.screen_StartY_b_0 - 1); + g_settings.screen_StartX_b_1 = configfile.getInt32("screen_StartX_b_1", 33); + g_settings.screen_StartY_b_1 = configfile.getInt32("screen_StartY_b_1", 18); + g_settings.screen_EndX_b_1 = configfile.getInt32("screen_EndX_b_1" , 1888 - g_settings.screen_StartX_b_1 - 1); + g_settings.screen_EndY_b_1 = configfile.getInt32("screen_EndY_b_1" , 1062 - g_settings.screen_StartY_b_1 - 1); g_settings.screen_preset = configfile.getInt32("screen_preset", COsdSetup::PRESET_SCREEN_A); setScreenSettings(); @@ -1241,17 +1241,17 @@ void CNeutrinoApp::setScreenSettings() { switch (g_settings.screen_preset) { case COsdSetup::PRESET_SCREEN_B: - g_settings.screen_StartX = g_settings.screen_StartX_lcd_b_1; - g_settings.screen_StartY = g_settings.screen_StartY_lcd_b_1; - g_settings.screen_EndX = g_settings.screen_EndX_lcd_b_1; - g_settings.screen_EndY = g_settings.screen_EndY_lcd_b_1; + g_settings.screen_StartX = g_settings.screen_StartX_b_1; + g_settings.screen_StartY = g_settings.screen_StartY_b_1; + g_settings.screen_EndX = g_settings.screen_EndX_b_1; + g_settings.screen_EndY = g_settings.screen_EndY_b_1; break; case COsdSetup::PRESET_SCREEN_A: default: - g_settings.screen_StartX = g_settings.screen_StartX_lcd_a_1; - g_settings.screen_StartY = g_settings.screen_StartY_lcd_a_1; - g_settings.screen_EndX = g_settings.screen_EndX_lcd_a_1; - g_settings.screen_EndY = g_settings.screen_EndY_lcd_a_1; + g_settings.screen_StartX = g_settings.screen_StartX_a_1; + g_settings.screen_StartY = g_settings.screen_StartY_a_1; + g_settings.screen_EndX = g_settings.screen_EndX_a_1; + g_settings.screen_EndY = g_settings.screen_EndY_a_1; break; } } @@ -1262,17 +1262,17 @@ void CNeutrinoApp::setScreenSettings() { switch (g_settings.screen_preset) { case COsdSetup::PRESET_SCREEN_B: - g_settings.screen_StartX = g_settings.screen_StartX_lcd_b_0; - g_settings.screen_StartY = g_settings.screen_StartY_lcd_b_0; - g_settings.screen_EndX = g_settings.screen_EndX_lcd_b_0; - g_settings.screen_EndY = g_settings.screen_EndY_lcd_b_0; + g_settings.screen_StartX = g_settings.screen_StartX_b_0; + g_settings.screen_StartY = g_settings.screen_StartY_b_0; + g_settings.screen_EndX = g_settings.screen_EndX_b_0; + g_settings.screen_EndY = g_settings.screen_EndY_b_0; break; case COsdSetup::PRESET_SCREEN_A: default: - g_settings.screen_StartX = g_settings.screen_StartX_lcd_a_0; - g_settings.screen_StartY = g_settings.screen_StartY_lcd_a_0; - g_settings.screen_EndX = g_settings.screen_EndX_lcd_a_0; - g_settings.screen_EndY = g_settings.screen_EndY_lcd_a_0; + g_settings.screen_StartX = g_settings.screen_StartX_a_0; + g_settings.screen_StartY = g_settings.screen_StartY_a_0; + g_settings.screen_EndX = g_settings.screen_EndX_a_0; + g_settings.screen_EndY = g_settings.screen_EndY_a_0; break; } } @@ -1825,22 +1825,22 @@ void CNeutrinoApp::saveSetup(const char * fname) //screen configuration configfile.setInt32("osd_resolution" , COsdHelpers::getInstance()->g_settings_osd_resolution_save); - configfile.setInt32("screen_StartX_lcd_a_0", g_settings.screen_StartX_lcd_a_0); - configfile.setInt32("screen_StartY_lcd_a_0", g_settings.screen_StartY_lcd_a_0); - configfile.setInt32("screen_EndX_lcd_a_0" , g_settings.screen_EndX_lcd_a_0); - configfile.setInt32("screen_EndY_lcd_a_0" , g_settings.screen_EndY_lcd_a_0); - configfile.setInt32("screen_StartX_lcd_a_1", g_settings.screen_StartX_lcd_a_1); - configfile.setInt32("screen_StartY_lcd_a_1", g_settings.screen_StartY_lcd_a_1); - configfile.setInt32("screen_EndX_lcd_a_1" , g_settings.screen_EndX_lcd_a_1); - configfile.setInt32("screen_EndY_lcd_a_1" , g_settings.screen_EndY_lcd_a_1); - configfile.setInt32("screen_StartX_lcd_b_0", g_settings.screen_StartX_lcd_b_0); - configfile.setInt32("screen_StartY_lcd_b_0", g_settings.screen_StartY_lcd_b_0); - configfile.setInt32("screen_EndX_lcd_b_0" , g_settings.screen_EndX_lcd_b_0); - configfile.setInt32("screen_EndY_lcd_b_0" , g_settings.screen_EndY_lcd_b_0); - configfile.setInt32("screen_StartX_lcd_b_1", g_settings.screen_StartX_lcd_b_1); - configfile.setInt32("screen_StartY_lcd_b_1", g_settings.screen_StartY_lcd_b_1); - configfile.setInt32("screen_EndX_lcd_b_1" , g_settings.screen_EndX_lcd_b_1); - configfile.setInt32("screen_EndY_lcd_b_1" , g_settings.screen_EndY_lcd_b_1); + configfile.setInt32("screen_StartX_a_0", g_settings.screen_StartX_a_0); + configfile.setInt32("screen_StartY_a_0", g_settings.screen_StartY_a_0); + configfile.setInt32("screen_EndX_a_0" , g_settings.screen_EndX_a_0); + configfile.setInt32("screen_EndY_a_0" , g_settings.screen_EndY_a_0); + configfile.setInt32("screen_StartX_a_1", g_settings.screen_StartX_a_1); + configfile.setInt32("screen_StartY_a_1", g_settings.screen_StartY_a_1); + configfile.setInt32("screen_EndX_a_1" , g_settings.screen_EndX_a_1); + configfile.setInt32("screen_EndY_a_1" , g_settings.screen_EndY_a_1); + configfile.setInt32("screen_StartX_b_0", g_settings.screen_StartX_b_0); + configfile.setInt32("screen_StartY_b_0", g_settings.screen_StartY_b_0); + configfile.setInt32("screen_EndX_b_0" , g_settings.screen_EndX_b_0); + configfile.setInt32("screen_EndY_b_0" , g_settings.screen_EndY_b_0); + configfile.setInt32("screen_StartX_b_1", g_settings.screen_StartX_b_1); + configfile.setInt32("screen_StartY_b_1", g_settings.screen_StartY_b_1); + configfile.setInt32("screen_EndX_b_1" , g_settings.screen_EndX_b_1); + configfile.setInt32("screen_EndY_b_1" , g_settings.screen_EndY_b_1); configfile.setInt32("screen_preset" , g_settings.screen_preset); //Software-update @@ -5900,14 +5900,14 @@ static struct __key_rename key_rename[] = { { "casystem_display", "infobar_casystem_display" }, { "casystem_dotmatrix", "infobar_casystem_dotmatrix"}, { "casystem_frame", "infobar_casystem_frame" }, - { "screen_StartX_lcd", "screen_StartX_lcd_a_0" }, - { "screen_StartY_lcd", "screen_StartY_lcd_a_0" }, - { "screen_EndX_lcd", "screen_EndX_lcd_a_0" }, - { "screen_EndY_lcd", "screen_EndY_lcd_a_0" }, - { "screen_StartX_crt", "screen_StartX_lcd_b_0" }, - { "screen_StartY_crt", "screen_StartY_lcd_b_0" }, - { "screen_EndX_crt", "screen_EndX_lcd_b_0" }, - { "screen_EndY_crt", "screen_EndY_lcd_b_0" }, + { "screen_StartX_lcd", "screen_StartX_a_0" }, + { "screen_StartY_lcd", "screen_StartY_a_0" }, + { "screen_EndX_lcd", "screen_EndX_a_0" }, + { "screen_EndY_lcd", "screen_EndY_a_0" }, + { "screen_StartX_crt", "screen_StartX_b_0" }, + { "screen_StartY_crt", "screen_StartY_b_0" }, + { "screen_EndX_crt", "screen_EndX_b_0" }, + { "screen_EndY_crt", "screen_EndY_b_0" }, { "timing.infobar_movieplayer", "timing.infobar_media_video" }, { "ci_clock", "ci_clock_0" }, { "ci_save_pincode", "ci_save_pincode_0" }, diff --git a/src/system/settings.h b/src/system/settings.h index dbc2b90c0..d431ac825 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -801,22 +801,22 @@ struct SNeutrinoSettings int screen_StartY; int screen_EndX; int screen_EndY; - int screen_StartX_lcd_a_0; - int screen_StartY_lcd_a_0; - int screen_EndX_lcd_a_0; - int screen_EndY_lcd_a_0; - int screen_StartX_lcd_a_1; - int screen_StartY_lcd_a_1; - int screen_EndX_lcd_a_1; - int screen_EndY_lcd_a_1; - int screen_StartX_lcd_b_0; - int screen_StartY_lcd_b_0; - int screen_EndX_lcd_b_0; - int screen_EndY_lcd_b_0; - int screen_StartX_lcd_b_1; - int screen_StartY_lcd_b_1; - int screen_EndX_lcd_b_1; - int screen_EndY_lcd_b_1; + int screen_StartX_a_0; + int screen_StartY_a_0; + int screen_EndX_a_0; + int screen_EndY_a_0; + int screen_StartX_a_1; + int screen_StartY_a_1; + int screen_EndX_a_1; + int screen_EndY_a_1; + int screen_StartX_b_0; + int screen_StartY_b_0; + int screen_EndX_b_0; + int screen_EndY_b_0; + int screen_StartX_b_1; + int screen_StartY_b_1; + int screen_EndX_b_1; + int screen_EndY_b_1; int osd_resolution; int screen_preset; int screen_width;