mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
fontrenderer: allow using customcolor.h colors for fonts
Origin commit data
------------------
Commit: 89251f648e
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-04-07 (Sun, 07 Apr 2013)
This commit is contained in:
committed by
Jacek Jendrzej
parent
f241d11c93
commit
13e8556e3e
@@ -436,7 +436,10 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
|
|||||||
fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x +
|
fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x +
|
||||||
y * frameBuffer->getStride() / sizeof(fb_pixel_t));
|
y * frameBuffer->getStride() / sizeof(fb_pixel_t));
|
||||||
// fb_pixel_t bgcolor = frameBuffer->realcolor[color];
|
// fb_pixel_t bgcolor = frameBuffer->realcolor[color];
|
||||||
fb_pixel_t fgcolor = frameBuffer->realcolor[(((((int)color) + 2) | 7) - 2)];
|
uint8_t fgindex = color; /* index of font color in the palette */
|
||||||
|
if (color > COL_BLACK0 && color < 254) /* bigger than 254 would result in > 255 */
|
||||||
|
fgindex = ((((int)color) + 2) | 7) - 2; /* no idea what this does exactly... */
|
||||||
|
fb_pixel_t fgcolor = frameBuffer->realcolor[fgindex];
|
||||||
|
|
||||||
if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) {
|
if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user