diff --git a/sys/msdos/vidvesa.c b/sys/msdos/vidvesa.c index 8a3423bc0..8a5ec21dd 100644 --- a/sys/msdos/vidvesa.c +++ b/sys/msdos/vidvesa.c @@ -691,9 +691,16 @@ vesa_xputg(const glyph_info *glyphinfo, const glyph_info *bkglyphinfo UNUSED) } #endif if (vesa_pixel_size > 8 && glyphinfo->gm.customcolor != 0) { - /* FIXME: won't display black (0,0,0) correctly, but the background - is usually black anyway */ - attr = glyphinfo->gm.customcolor | 0x80000000; + attr = glyphinfo->gm.customcolor; + if (attr & NH_BASIC_COLOR) { + attr &= 0x0F; + } else { + struct Pixel p; + p.r = (unsigned char)(attr >> 16); + p.g = (unsigned char)(attr >> 8); + p.b = (unsigned char)(attr >> 0); + attr = vesa_MakeColor(p) | 0x80000000; + } } row = currow;