1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Support \e[39m and \e[49m in the console.

This commit is contained in:
Jonas 'Sortie' Termansen 2014-08-01 23:33:50 +02:00
parent fac70d5119
commit 58c7070134

View file

@ -553,6 +553,12 @@ void TextTerminal::RunAnsiCommand(TextBuffer* textbuf, char c)
vgacolor &= 0xF0;
vgacolor |= conversion[val] << 0;
}
// Set default text color.
else if ( cmd == 39 )
{
vgacolor &= 0xF0;
vgacolor |= DEFAULT_COLOR & 0x0F;
}
// Set background color.
else if ( 40 <= cmd && cmd <= 47 )
{
@ -560,6 +566,12 @@ void TextTerminal::RunAnsiCommand(TextBuffer* textbuf, char c)
vgacolor &= 0x0F;
vgacolor |= conversion[val] << 4;
}
// Set default background color.
else if ( cmd == 49 )
{
vgacolor &= 0x0F;
vgacolor |= DEFAULT_COLOR & 0xF0;
}
// Set text color.
else if ( 90 <= cmd && cmd <= 97 )
{