From 118fc9ce9a586d0a07068b15f515014f1adab4e8 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 5 Aug 2012 18:58:03 +0200 Subject: [PATCH] The lfb text buffer class now uses the correct cursor color. --- sortix/lfbtextbuffer.cpp | 3 +-- sortix/lfbtextbuffer.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sortix/lfbtextbuffer.cpp b/sortix/lfbtextbuffer.cpp index 6823945d..173dda51 100644 --- a/sortix/lfbtextbuffer.cpp +++ b/sortix/lfbtextbuffer.cpp @@ -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; } } } diff --git a/sortix/lfbtextbuffer.h b/sortix/lfbtextbuffer.h index 4165dbe4..6a81cc91 100644 --- a/sortix/lfbtextbuffer.h +++ b/sortix/lfbtextbuffer.h @@ -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;