1
0
Fork 0
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:
Jonas 'Sortie' Termansen 2012-08-05 18:58:03 +02:00
parent 755e855c08
commit 118fc9ce9a
2 changed files with 1 additions and 3 deletions

View file

@ -78,7 +78,6 @@ LFBTextBuffer* CreateLFBTextBuffer(uint8_t* lfb, uint32_t lfbformat,
ret->chars = chars;
Memory::Set(attrs, 0, sizeof(uint16_t) * columns * rows);
ret->attrs = attrs;
ret->cursorcolor = ColorFromRGB(200, 200, 200);
for ( size_t i = 0; i < 16UL; i++ )
{
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);
size_t pixelx = posx * (VGA_FONT_WIDTH+1) + x;
line[pixelx] = cursorcolor;
line[pixelx] = fgcolor;
}
}
}

View file

@ -99,7 +99,6 @@ private:
size_t pixelsy;
size_t scansize;
uint32_t colors[16UL];
uint32_t cursorcolor;
uint32_t lfbformat;
bool cursorenabled;
TextPos cursorpos;