mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
The SRM console gets the red and blue attributes backwards in the VGA
palette. As a result, the colors on the video console can look rather weird. For example, sysinstall on the alpha has a read background. We can work around this partially by remapping the colors used by syscons for the ANSI color escape sequences. Note that screen savers and anything that sets the colors explicitly will still get incorrect colors, but programs such as sysinstall will now use the correct colors. A more correct fix would be to actually fix the VGA palette on boot by either swapping all the red and blue attributes or by hardcoding a standard palette and overwriting the entire palette. Requested by: gallatin Obtained from: NetBSD
This commit is contained in:
parent
a8f1210095
commit
329292029c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73792
@ -172,10 +172,22 @@ static void
|
||||
scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
|
||||
{
|
||||
static u_char ansi_col[16] = {
|
||||
#ifdef __alpha__
|
||||
/*
|
||||
* DEC is evil. They switch the red and blue attributes in the
|
||||
* palette in the system console. As a simple work-around, re-map
|
||||
* the ANSI colors appropriately.
|
||||
*/
|
||||
FG_BLACK, FG_BLUE, FG_GREEN, FG_CYAN,
|
||||
FG_RED, FG_MAGENTA, FG_BROWN, FG_LIGHTGREY,
|
||||
FG_DARKGREY, FG_LIGHTBLUE, FG_LIGHTGREEN, FG_LIGHTCYAN,
|
||||
FG_LIGHTRED, FG_LIGHTMAGENTA, FG_YELLOW, FG_WHITE
|
||||
#else
|
||||
FG_BLACK, FG_RED, FG_GREEN, FG_BROWN,
|
||||
FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY,
|
||||
FG_DARKGREY, FG_LIGHTRED, FG_LIGHTGREEN, FG_YELLOW,
|
||||
FG_LIGHTBLUE, FG_LIGHTMAGENTA, FG_LIGHTCYAN, FG_WHITE
|
||||
#endif
|
||||
};
|
||||
sc_softc_t *sc;
|
||||
int i, n;
|
||||
|
Loading…
Reference in New Issue
Block a user