mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
framebuffer: rename scaleFont() to scale2Res()
Origin commit data
------------------
Branch: ni/coolstream
Commit: e631c3e3c0
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-19 (Sun, 19 Feb 2017)
Origin message was:
------------------
- framebuffer: rename scaleFont() to scale2Res()
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -129,7 +129,7 @@ class CFbAccelCSHD2
|
|||||||
fb_pixel_t * getBackBufferPointer() const;
|
fb_pixel_t * getBackBufferPointer() const;
|
||||||
void setBlendMode(uint8_t);
|
void setBlendMode(uint8_t);
|
||||||
void setBlendLevel(int);
|
void setBlendLevel(int);
|
||||||
int scaleFont(int size);
|
int scale2Res(int size);
|
||||||
bool fullHdAvailable();
|
bool fullHdAvailable();
|
||||||
void setOsdResolutions();
|
void setOsdResolutions();
|
||||||
uint32_t getWidth4FB_HW_ACC(const uint32_t x, const uint32_t w, const bool max=true);
|
uint32_t getWidth4FB_HW_ACC(const uint32_t x, const uint32_t w, const bool max=true);
|
||||||
|
@@ -290,8 +290,13 @@ void CFbAccelCSHD2::setBlendLevel(int level)
|
|||||||
usleep(20000);
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
if (screeninfo.xres == 1920)
|
if (screeninfo.xres == 1920)
|
||||||
size += size/2;
|
size += size/2;
|
||||||
|
|
||||||
|
@@ -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 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 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 bool fullHdAvailable() { return false; };
|
||||||
virtual void setOsdResolutions();
|
virtual void setOsdResolutions();
|
||||||
std::vector<osd_resolution_t> osd_resolutions;
|
std::vector<osd_resolution_t> osd_resolutions;
|
||||||
|
@@ -180,7 +180,7 @@ void CNeutrinoFonts::SetupNeutrinoFonts(bool initRenderClass/*=true*/)
|
|||||||
for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++) {
|
for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++) {
|
||||||
if (g_Font[i]) delete g_Font[i];
|
if (g_Font[i]) delete g_Font[i];
|
||||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
#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;
|
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;
|
||||||
#else
|
#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;
|
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
|
#endif
|
||||||
@@ -188,7 +188,7 @@ void CNeutrinoFonts::SetupNeutrinoFonts(bool initRenderClass/*=true*/)
|
|||||||
}
|
}
|
||||||
if (g_SignalFont) delete g_SignalFont;
|
if (g_SignalFont) delete g_SignalFont;
|
||||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||||
fontSize = CFrameBuffer::getInstance()->scaleFont(signal_font.defaultsize) + signal_font.size_offset * fontDescr.size_offset;
|
fontSize = CFrameBuffer::getInstance()->scale2Res(signal_font.defaultsize) + signal_font.size_offset * fontDescr.size_offset;
|
||||||
#else
|
#else
|
||||||
fontSize = signal_font.defaultsize + signal_font.size_offset * fontDescr.size_offset;
|
fontSize = signal_font.defaultsize + signal_font.size_offset * fontDescr.size_offset;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -77,7 +77,7 @@ void CInfoClock::initCCLockItems()
|
|||||||
//set height, NOTE: height is strictly bound to settings
|
//set height, NOTE: height is strictly bound to settings
|
||||||
height = g_settings.infoClockFontSize;
|
height = g_settings.infoClockFontSize;
|
||||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||||
height = CFrameBuffer::getInstance()->scaleFont(height);
|
height = CFrameBuffer::getInstance()->scale2Res(height);
|
||||||
#endif
|
#endif
|
||||||
initClockFont(0, height);
|
initClockFont(0, height);
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ void CVolumeBar::initVarVolumeBar()
|
|||||||
vb_item_offset = OFFSET_INNER_SMALL;
|
vb_item_offset = OFFSET_INNER_SMALL;
|
||||||
height = g_settings.volume_size; //default height
|
height = g_settings.volume_size; //default height
|
||||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||||
height = CFrameBuffer::getInstance()->scaleFont(height);
|
height = CFrameBuffer::getInstance()->scale2Res(height);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//assume volume value as pointer to global setting
|
//assume volume value as pointer to global setting
|
||||||
@@ -96,7 +96,7 @@ void CVolumeBar::initVolumeBarSize()
|
|||||||
//scale
|
//scale
|
||||||
vb_pbw = 200;
|
vb_pbw = 200;
|
||||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||||
vb_pbw = CFrameBuffer::getInstance()->scaleFont(vb_pbw);
|
vb_pbw = CFrameBuffer::getInstance()->scale2Res(vb_pbw);
|
||||||
#endif
|
#endif
|
||||||
vb_pbh = height-4*vb_item_offset;
|
vb_pbh = height-4*vb_item_offset;
|
||||||
|
|
||||||
@@ -370,7 +370,7 @@ void CVolumeHelper::initVolBarSize()
|
|||||||
g_settings.volume_size = max(g_settings.volume_size, icon_height);
|
g_settings.volume_size = max(g_settings.volume_size, icon_height);
|
||||||
vol_height = g_settings.volume_size;
|
vol_height = g_settings.volume_size;
|
||||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
||||||
vol_height = CFrameBuffer::getInstance()->scaleFont(vol_height);
|
vol_height = CFrameBuffer::getInstance()->scale2Res(vol_height);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (g_settings.volume_digits) {
|
if (g_settings.volume_digits) {
|
||||||
|
Reference in New Issue
Block a user