mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
fontrenderer: use background color of framebuffer
This commit is contained in:
committed by
Jacek Jendrzej
parent
13871d8328
commit
629dc8562f
@@ -432,7 +432,10 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
|
||||
static fb_pixel_t oldbgcolor = 0, oldfgcolor = 0;
|
||||
static fb_pixel_t colors[256]={0};
|
||||
|
||||
fb_pixel_t bgcolor = frameBuffer->realcolor[color];
|
||||
/* fetch bgcolor from framebuffer, using lower left edge of the font... */
|
||||
fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x +
|
||||
y * frameBuffer->getStride() / sizeof(fb_pixel_t));
|
||||
// fb_pixel_t bgcolor = frameBuffer->realcolor[color];
|
||||
fb_pixel_t fgcolor = frameBuffer->realcolor[(((((int)color) + 2) | 7) - 2)];
|
||||
|
||||
if((oldbgcolor != bgcolor) || (oldfgcolor != fgcolor)) {
|
||||
|
Reference in New Issue
Block a user