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
1 changed files with 12 additions and 0 deletions

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 )
{