mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
rename screen_x/yres to font_scaling_x/y
Origin commit data
------------------
Branch: ni/coolstream
Commit: aeec37af89
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-01-12 (Thu, 12 Jan 2017)
Origin message was:
------------------
- rename screen_x/yres to font_scaling_x/y
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Michael Liebmann
parent
deb1f1c331
commit
050a0c720c
@@ -142,7 +142,7 @@ void CNeutrinoFonts::SetupNeutrinoFonts(bool initRenderClass/*=true*/)
|
||||
if (initRenderClass) {
|
||||
if (g_fontRenderer != NULL)
|
||||
delete g_fontRenderer;
|
||||
g_fontRenderer = new FBFontRenderClass(72 * g_settings.screen_xres / 100, 72 * g_settings.screen_yres / 100);
|
||||
g_fontRenderer = new FBFontRenderClass(72 * g_settings.font_scaling_x / 100, 72 * g_settings.font_scaling_y / 100);
|
||||
|
||||
old_fontDescr.size_offset = fontDescr.size_offset;
|
||||
old_fontDescr.filename = fontDescr.filename;
|
||||
|
@@ -267,26 +267,26 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
return res;
|
||||
}
|
||||
else if (actionKey == "font_scaling") {
|
||||
int xre = g_settings.screen_xres;
|
||||
int yre = g_settings.screen_yres;
|
||||
int fs_x = g_settings.font_scaling_x;
|
||||
int fs_y = g_settings.font_scaling_y;
|
||||
|
||||
CMenuWidget fontscale(LOCALE_FONTMENU_HEAD, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_FONTSCALE);
|
||||
fontscale.addIntroItems(LOCALE_FONTMENU_SCALING);
|
||||
|
||||
CMenuOptionNumberChooser* mc = new CMenuOptionNumberChooser(LOCALE_FONTMENU_SCALING_X, &g_settings.screen_xres, true, 50, 200, this);
|
||||
CMenuOptionNumberChooser* mc = new CMenuOptionNumberChooser(LOCALE_FONTMENU_SCALING_X, &g_settings.font_scaling_x, true, 50, 200, this);
|
||||
mc->setNumericInput(true);
|
||||
mc->setNumberFormat("%d%%");
|
||||
fontscale.addItem(mc);
|
||||
|
||||
mc = new CMenuOptionNumberChooser(LOCALE_FONTMENU_SCALING_Y, &g_settings.screen_yres, true, 50, 200, this);
|
||||
mc = new CMenuOptionNumberChooser(LOCALE_FONTMENU_SCALING_Y, &g_settings.font_scaling_y, true, 50, 200, this);
|
||||
mc->setNumericInput(true);
|
||||
mc->setNumberFormat("%d%%");
|
||||
fontscale.addItem(mc);
|
||||
|
||||
res = fontscale.exec(NULL, "");
|
||||
|
||||
if (xre != g_settings.screen_xres || yre != g_settings.screen_yres) {
|
||||
printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", g_settings.screen_xres, g_settings.screen_yres);
|
||||
if (fs_x != g_settings.font_scaling_x || fs_y != g_settings.font_scaling_y) {
|
||||
printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", g_settings.font_scaling_x, g_settings.font_scaling_y);
|
||||
CNeutrinoApp::getInstance()->SetupFonts(CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT | CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT_INST | CNeutrinoFonts::FONTSETUP_DYN_FONT);
|
||||
if (CNeutrinoApp::getInstance()->channelList)
|
||||
CNeutrinoApp::getInstance()->channelList->ResetModules(); //force re init of all modules
|
||||
|
@@ -721,8 +721,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.channellist_show_numbers = configfile.getInt32("channellist_show_numbers", 1);
|
||||
|
||||
//screen configuration
|
||||
g_settings.screen_xres = configfile.getInt32("screen_xres", 100);
|
||||
g_settings.screen_yres = configfile.getInt32("screen_yres", 100);
|
||||
g_settings.screen_StartX_crt = configfile.getInt32( "screen_StartX_crt", DEFAULT_X_START_SD);
|
||||
g_settings.screen_StartY_crt = configfile.getInt32( "screen_StartY_crt", DEFAULT_Y_START_SD );
|
||||
g_settings.screen_EndX_crt = configfile.getInt32( "screen_EndX_crt", DEFAULT_X_END_SD);
|
||||
@@ -783,6 +781,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.ttx_font_file = configfile.getString( "ttx_font_file", FONTDIR"/DejaVuLGCSansMono-Bold.ttf");
|
||||
ttx_font_file = g_settings.ttx_font_file.c_str();
|
||||
|
||||
g_settings.font_scaling_x = configfile.getInt32("font_scaling_x", 100);
|
||||
g_settings.font_scaling_y = configfile.getInt32("font_scaling_y", 100);
|
||||
|
||||
g_settings.update_dir = configfile.getString("update_dir", "/tmp");
|
||||
g_settings.update_dir_opkg = configfile.getString("update_dir_opkg", g_settings.update_dir);
|
||||
|
||||
@@ -987,6 +988,16 @@ void CNeutrinoApp::upgradeSetup(const char * fname)
|
||||
configfile.deleteKey("progressbar_timescale_yellow");
|
||||
configfile.deleteKey("progressbar_timescale_invert");
|
||||
}
|
||||
if (g_settings.version_pseudo < "20170209181001")
|
||||
{
|
||||
//convert screen_x/yres keys to font_scaling_x/y
|
||||
|
||||
g_settings.font_scaling_x = configfile.getInt32("screen_xres", 100);
|
||||
g_settings.font_scaling_y = configfile.getInt32("screen_yres", 100);
|
||||
|
||||
configfile.deleteKey("screen_xres");
|
||||
configfile.deleteKey("screen_yres");
|
||||
}
|
||||
|
||||
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
|
||||
configfile.setString("version_pseudo", g_settings.version_pseudo);
|
||||
@@ -1297,8 +1308,6 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32("channellist_show_numbers", g_settings.channellist_show_numbers);
|
||||
|
||||
//screen configuration
|
||||
configfile.setInt32( "screen_xres", g_settings.screen_xres);
|
||||
configfile.setInt32( "screen_yres", g_settings.screen_yres);
|
||||
configfile.setInt32( "screen_StartX_lcd", g_settings.screen_StartX_lcd );
|
||||
configfile.setInt32( "screen_StartY_lcd", g_settings.screen_StartY_lcd );
|
||||
configfile.setInt32( "screen_EndX_lcd", g_settings.screen_EndX_lcd );
|
||||
@@ -1338,6 +1347,9 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setString("font_file", g_settings.font_file);
|
||||
configfile.setString("ttx_font_file", g_settings.ttx_font_file);
|
||||
|
||||
configfile.setInt32( "font_scaling_x", g_settings.font_scaling_x);
|
||||
configfile.setInt32( "font_scaling_y", g_settings.font_scaling_y);
|
||||
|
||||
//parentallock
|
||||
configfile.setInt32( "parentallock_prompt", g_settings.parentallock_prompt );
|
||||
configfile.setInt32( "parentallock_lockage", g_settings.parentallock_lockage );
|
||||
|
@@ -619,8 +619,6 @@ struct SNeutrinoSettings
|
||||
int screen_preset;
|
||||
int screen_width;
|
||||
int screen_height;
|
||||
int screen_xres;
|
||||
int screen_yres;
|
||||
|
||||
//Software-update
|
||||
int softupdate_mode;
|
||||
@@ -778,9 +776,13 @@ struct SNeutrinoSettings
|
||||
int zap_cycle;
|
||||
int sms_channel;
|
||||
int sms_movie;
|
||||
|
||||
std::string font_file;
|
||||
std::string ttx_font_file;
|
||||
|
||||
int font_scaling_x;
|
||||
int font_scaling_y;
|
||||
|
||||
int livestreamResolution;
|
||||
std::string livestreamScriptPath;
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
#define NEUTRINO_VERSION_PSEUDO "20162912080000"
|
||||
#define NEUTRINO_VERSION_PSEUDO "20170209181001"
|
||||
|
Reference in New Issue
Block a user