mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
The lfb text buffer class now uses the correct cursor color.
This commit is contained in:
parent
755e855c08
commit
118fc9ce9a
2 changed files with 1 additions and 3 deletions
|
@ -78,7 +78,6 @@ LFBTextBuffer* CreateLFBTextBuffer(uint8_t* lfb, uint32_t lfbformat,
|
||||||
ret->chars = chars;
|
ret->chars = chars;
|
||||||
Memory::Set(attrs, 0, sizeof(uint16_t) * columns * rows);
|
Memory::Set(attrs, 0, sizeof(uint16_t) * columns * rows);
|
||||||
ret->attrs = attrs;
|
ret->attrs = attrs;
|
||||||
ret->cursorcolor = ColorFromRGB(200, 200, 200);
|
|
||||||
for ( size_t i = 0; i < 16UL; i++ )
|
for ( size_t i = 0; i < 16UL; i++ )
|
||||||
{
|
{
|
||||||
uint8_t r = i & 0b0100 ? (i & 0b1000 ? 255 : 191) : 0;
|
uint8_t r = i & 0b0100 ? (i & 0b1000 ? 255 : 191) : 0;
|
||||||
|
@ -193,7 +192,7 @@ void LFBTextBuffer::RenderChar(uint16_t vgachar, size_t posx, size_t posy)
|
||||||
{
|
{
|
||||||
uint32_t* line = (uint32_t*) (lfb + pixely * scansize);
|
uint32_t* line = (uint32_t*) (lfb + pixely * scansize);
|
||||||
size_t pixelx = posx * (VGA_FONT_WIDTH+1) + x;
|
size_t pixelx = posx * (VGA_FONT_WIDTH+1) + x;
|
||||||
line[pixelx] = cursorcolor;
|
line[pixelx] = fgcolor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,6 @@ private:
|
||||||
size_t pixelsy;
|
size_t pixelsy;
|
||||||
size_t scansize;
|
size_t scansize;
|
||||||
uint32_t colors[16UL];
|
uint32_t colors[16UL];
|
||||||
uint32_t cursorcolor;
|
|
||||||
uint32_t lfbformat;
|
uint32_t lfbformat;
|
||||||
bool cursorenabled;
|
bool cursorenabled;
|
||||||
TextPos cursorpos;
|
TextPos cursorpos;
|
||||||
|
|
Loading…
Reference in a new issue