mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
Merge branch 'ni/tuxbox' into ni/mp/tuxbox
Origin commit data
------------------
Commit: d894829c43
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-19 (Sun, 19 Feb 2017)
This commit is contained in:
@@ -129,7 +129,7 @@ class CFbAccelCSHD2
|
||||
fb_pixel_t * getBackBufferPointer() const;
|
||||
void setBlendMode(uint8_t);
|
||||
void setBlendLevel(int);
|
||||
int scaleFont(int size);
|
||||
int scale2Res(int size);
|
||||
bool fullHdAvailable();
|
||||
void setOsdResolutions();
|
||||
uint32_t getWidth4FB_HW_ACC(const uint32_t x, const uint32_t w, const bool max=true);
|
||||
|
@@ -290,10 +290,17 @@ void CFbAccelCSHD2::setBlendLevel(int level)
|
||||
usleep(20000);
|
||||
}
|
||||
|
||||
int CFbAccelCSHD2::scaleFont(int size)
|
||||
int CFbAccelCSHD2::scale2Res(int size)
|
||||
{
|
||||
/*
|
||||
The historic resolution 1280x720 is default for some values/sizes.
|
||||
So let's scale these values to other resolutions.
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||
if (screeninfo.xres == 1920)
|
||||
size += size/2;
|
||||
#endif
|
||||
|
||||
return size;
|
||||
}
|
||||
|
@@ -277,7 +277,7 @@ class CFrameBuffer : public sigc::trackable
|
||||
virtual void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||
|
||||
virtual void mark(int x, int y, int dx, int dy);
|
||||
virtual int scaleFont(int size) { return size; };
|
||||
virtual int scale2Res(int size) { return size; };
|
||||
virtual bool fullHdAvailable() { return false; };
|
||||
virtual void setOsdResolutions();
|
||||
std::vector<osd_resolution_t> osd_resolutions;
|
||||
|
@@ -179,19 +179,11 @@ void CNeutrinoFonts::SetupNeutrinoFonts(bool initRenderClass/*=true*/)
|
||||
int fontSize;
|
||||
for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++) {
|
||||
if (g_Font[i]) delete g_Font[i];
|
||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||
fontSize = CFrameBuffer::getInstance()->scaleFont(CNeutrinoApp::getInstance()->getConfigFile()->getInt32(locale_real_names[neutrino_font[i].name], neutrino_font[i].defaultsize)) + neutrino_font[i].size_offset * fontDescr.size_offset;
|
||||
#else
|
||||
fontSize = CNeutrinoApp::getInstance()->getConfigFile()->getInt32(locale_real_names[neutrino_font[i].name], neutrino_font[i].defaultsize) + neutrino_font[i].size_offset * fontDescr.size_offset;
|
||||
#endif
|
||||
fontSize = CFrameBuffer::getInstance()->scale2Res(CNeutrinoApp::getInstance()->getConfigFile()->getInt32(locale_real_names[neutrino_font[i].name], neutrino_font[i].defaultsize)) + neutrino_font[i].size_offset * fontDescr.size_offset;
|
||||
g_Font[i] = g_fontRenderer->getFont(fontDescr.name.c_str(), fontStyle[neutrino_font[i].style].c_str(), fontSize);
|
||||
}
|
||||
if (g_SignalFont) delete g_SignalFont;
|
||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||
fontSize = CFrameBuffer::getInstance()->scaleFont(signal_font.defaultsize) + signal_font.size_offset * fontDescr.size_offset;
|
||||
#else
|
||||
fontSize = signal_font.defaultsize + signal_font.size_offset * fontDescr.size_offset;
|
||||
#endif
|
||||
fontSize = CFrameBuffer::getInstance()->scale2Res(signal_font.defaultsize) + signal_font.size_offset * fontDescr.size_offset;
|
||||
g_SignalFont = g_fontRenderer->getFont(fontDescr.name.c_str(), fontStyle[signal_font.style].c_str(), fontSize);
|
||||
}
|
||||
|
||||
|
@@ -160,7 +160,7 @@ bool CEpgScan::AddSelected()
|
||||
|
||||
void CEpgScan::AddTransponders()
|
||||
{
|
||||
if(bouquetList->Bouquets.empty())
|
||||
if(!bouquetList || bouquetList->Bouquets.empty())
|
||||
return;
|
||||
|
||||
if (current_mode != g_settings.epg_scan) {
|
||||
|
@@ -75,10 +75,7 @@ void CInfoClock::initCCLockItems()
|
||||
setClockFormat("%H:%M", "%H %M");
|
||||
|
||||
//set height, NOTE: height is strictly bound to settings
|
||||
height = g_settings.infoClockFontSize;
|
||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||
height = CFrameBuffer::getInstance()->scaleFont(height);
|
||||
#endif
|
||||
height = CFrameBuffer::getInstance()->scale2Res(g_settings.infoClockFontSize);
|
||||
initClockFont(0, height);
|
||||
|
||||
// set corner radius depending on clock height
|
||||
|
@@ -128,17 +128,24 @@ CMoviePlayerGui::CMoviePlayerGui()
|
||||
|
||||
CMoviePlayerGui::~CMoviePlayerGui()
|
||||
{
|
||||
//playback->Close();
|
||||
if (this == instance_mp)
|
||||
stopPlayBack();
|
||||
delete moviebrowser;
|
||||
moviebrowser = NULL;
|
||||
delete filebrowser;
|
||||
filebrowser = NULL;
|
||||
delete bookmarkmanager;
|
||||
bookmarkmanager = NULL;
|
||||
delete playback;
|
||||
playback = NULL;
|
||||
if(moviebrowser){
|
||||
delete moviebrowser;
|
||||
moviebrowser = NULL;
|
||||
}
|
||||
if(filebrowser){
|
||||
delete filebrowser;
|
||||
filebrowser = NULL;
|
||||
}
|
||||
if(bookmarkmanager){
|
||||
delete bookmarkmanager;
|
||||
bookmarkmanager = NULL;
|
||||
}
|
||||
if(playback){
|
||||
delete playback;
|
||||
playback = NULL;
|
||||
}
|
||||
if (this == instance_mp) {
|
||||
delete instance_bg;
|
||||
instance_bg = NULL;
|
||||
|
@@ -53,10 +53,7 @@ void CVolumeBar::initVarVolumeBar()
|
||||
col_body = COL_MENUCONTENT_PLUS_0;
|
||||
corner_rad = CORNER_RADIUS_MID;
|
||||
vb_item_offset = OFFSET_INNER_SMALL;
|
||||
height = g_settings.volume_size; //default height
|
||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||
height = CFrameBuffer::getInstance()->scaleFont(height);
|
||||
#endif
|
||||
height = CFrameBuffer::getInstance()->scale2Res(g_settings.volume_size);
|
||||
|
||||
//assume volume value as pointer to global setting
|
||||
vb_vol = &g_settings.current_volume;
|
||||
@@ -94,10 +91,7 @@ void CVolumeBar::initVolumeBarSize()
|
||||
//vb_digit_w += corner_rad/2;
|
||||
|
||||
//scale
|
||||
vb_pbw = 200;
|
||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||
vb_pbw = CFrameBuffer::getInstance()->scaleFont(vb_pbw);
|
||||
#endif
|
||||
vb_pbw = CFrameBuffer::getInstance()->scale2Res(200);
|
||||
vb_pbh = height-4*vb_item_offset;
|
||||
|
||||
//result for width
|
||||
@@ -372,10 +366,7 @@ void CVolumeHelper::initVolBarSize()
|
||||
icon_height += 2;
|
||||
icon_width += 8;
|
||||
g_settings.volume_size = max(g_settings.volume_size, icon_height);
|
||||
vol_height = g_settings.volume_size;
|
||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||
vol_height = CFrameBuffer::getInstance()->scaleFont(vol_height);
|
||||
#endif
|
||||
vol_height = CFrameBuffer::getInstance()->scale2Res(g_settings.volume_size);
|
||||
|
||||
if (g_settings.volume_digits) {
|
||||
CNeutrinoFonts *cnf = CNeutrinoFonts::getInstance();
|
||||
|
@@ -975,10 +975,10 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO
|
||||
#define DEFAULT_LCD_AUTODIMM 0x00
|
||||
#define DEFAULT_LCD_SHOW_VOLUME 0x01
|
||||
|
||||
#define CORNER_RADIUS_LARGE 11
|
||||
#define CORNER_RADIUS_MID 7
|
||||
#define CORNER_RADIUS_SMALL 5
|
||||
#define CORNER_RADIUS_MIN 3
|
||||
#define CORNER_RADIUS_LARGE CFrameBuffer::getInstance()->scale2Res(11)
|
||||
#define CORNER_RADIUS_MID CFrameBuffer::getInstance()->scale2Res(7)
|
||||
#define CORNER_RADIUS_SMALL CFrameBuffer::getInstance()->scale2Res(5)
|
||||
#define CORNER_RADIUS_MIN CFrameBuffer::getInstance()->scale2Res(3)
|
||||
#define CORNER_RADIUS_NONE 0
|
||||
|
||||
#define RADIUS_LARGE (g_settings.rounded_corners ? CORNER_RADIUS_LARGE : 0)
|
||||
@@ -988,12 +988,12 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO
|
||||
#define RADIUS_NONE 0
|
||||
|
||||
// offsets
|
||||
#define OFFSET_SHADOW 6
|
||||
#define OFFSET_INTER 6
|
||||
#define OFFSET_INNER_LARGE 20
|
||||
#define OFFSET_INNER_MID 10
|
||||
#define OFFSET_INNER_SMALL 5
|
||||
#define OFFSET_INNER_MIN 2
|
||||
#define OFFSET_SHADOW CFrameBuffer::getInstance()->scale2Res(6)
|
||||
#define OFFSET_INTER CFrameBuffer::getInstance()->scale2Res(6)
|
||||
#define OFFSET_INNER_LARGE CFrameBuffer::getInstance()->scale2Res(20)
|
||||
#define OFFSET_INNER_MID CFrameBuffer::getInstance()->scale2Res(10)
|
||||
#define OFFSET_INNER_SMALL CFrameBuffer::getInstance()->scale2Res(5)
|
||||
#define OFFSET_INNER_MIN CFrameBuffer::getInstance()->scale2Res(2)
|
||||
#define OFFSET_INNER_NONE 0
|
||||
|
||||
#define SCROLLBAR_WIDTH OFFSET_INNER_MID + 2*OFFSET_INNER_MIN
|
||||
|
Reference in New Issue
Block a user