Render ANSI black text inverse (so that it is readable on black terminals)
This commit is contained in:
parent
12ae6973a6
commit
852adafe57
|
|
@ -377,7 +377,7 @@ void Sys_AnsiColorPrint( const char *msg )
|
|||
int length = 0;
|
||||
static int q3ToAnsi[ 8 ] =
|
||||
{
|
||||
30, // COLOR_BLACK
|
||||
7, // COLOR_BLACK
|
||||
31, // COLOR_RED
|
||||
32, // COLOR_GREEN
|
||||
33, // COLOR_YELLOW
|
||||
|
|
@ -407,8 +407,8 @@ void Sys_AnsiColorPrint( const char *msg )
|
|||
}
|
||||
else
|
||||
{
|
||||
// Print the color code
|
||||
Com_sprintf( buffer, sizeof( buffer ), "\033[%dm",
|
||||
// Print the color code (reset first to clear potential inverse (black))
|
||||
Com_sprintf( buffer, sizeof( buffer ), "\033[0m\033[%dm",
|
||||
q3ToAnsi[ ColorIndex( *( msg + 1 ) ) ] );
|
||||
fputs( buffer, stderr );
|
||||
msg += 2;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user