mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
neutrino: resize framebuffer on videomode change
this is needed on spark because the framebuffer has the same resolution
as the video plane...
Origin commit data
------------------
Commit: b34e7205b9
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-02-22 (Wed, 22 Feb 2012)
This commit is contained in:
@@ -246,6 +246,7 @@ Font::Font(FBFontRenderClass *render, FTC_FaceID faceid, const int isize, const
|
||||
|
||||
xmult = frameBuffer->scaleX(SCALE_MULT, false);
|
||||
ymult = frameBuffer->scaleY(SCALE_MULT, false);
|
||||
last_xmult = xmult;
|
||||
|
||||
setSize(isize);
|
||||
}
|
||||
@@ -258,6 +259,7 @@ FT_Error Font::getGlyphBitmap(FT_ULong glyph_index, FTC_SBit *sbit)
|
||||
int Font::setSize(int isize)
|
||||
{
|
||||
int temp = font.width;
|
||||
last_size = isize;
|
||||
font.width = isize * xmult / SCALE_MULT;
|
||||
font.height = isize * ymult / SCALE_MULT;
|
||||
scaler.width = font.width * 64;
|
||||
@@ -379,6 +381,13 @@ void Font::RenderString(int _x, int _y, const int _width, const char *text, cons
|
||||
if (!frameBuffer->getActive())
|
||||
return;
|
||||
|
||||
if ((xmult = frameBuffer->scaleX(SCALE_MULT, false)) != last_xmult)
|
||||
{
|
||||
last_xmult = xmult;
|
||||
ymult = frameBuffer->scaleY(SCALE_MULT, false);
|
||||
setSize(last_size);
|
||||
}
|
||||
|
||||
int x = _x * xmult / SCALE_MULT;
|
||||
int y = _y * ymult / SCALE_MULT;
|
||||
int boxheight = _boxheight * ymult / SCALE_MULT;
|
||||
|
Reference in New Issue
Block a user