mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-10 23:58:06 -05:00
Disable true colour on monochrome or paletted displays.
I'm not sure if any X11 monochrome visuals or Windows paletted display modes are still around, but just in case they are, we shouldn't attempt true colour on either kind of display.
This commit is contained in:
parent
2f9738a282
commit
1adf211d70
@ -3255,6 +3255,9 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
|
||||
} else
|
||||
ncombining = 1;
|
||||
|
||||
if (monochrome)
|
||||
truecolour.fg = truecolour.bg = optionalrgb_none;
|
||||
|
||||
nfg = ((monochrome ? ATTR_DEFFG : (attr & ATTR_FGMASK)) >> ATTR_FGSHIFT);
|
||||
nbg = ((monochrome ? ATTR_DEFBG : (attr & ATTR_BGMASK)) >> ATTR_BGSHIFT);
|
||||
if (!!(attr & ATTR_REVERSE) ^ (monochrome && (attr & TATTR_ACTCURS))) {
|
||||
|
@ -3522,12 +3522,12 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
|
||||
if (nbg < 16) nbg |= 8;
|
||||
else if (nbg >= 256) nbg |= 1;
|
||||
}
|
||||
if (truecolour.fg.enabled)
|
||||
if (!pal && truecolour.fg.enabled)
|
||||
fg = RGB(truecolour.fg.r, truecolour.fg.g, truecolour.fg.b);
|
||||
else
|
||||
fg = colours[nfg];
|
||||
|
||||
if (truecolour.bg.enabled)
|
||||
if (!pal && truecolour.bg.enabled)
|
||||
bg = RGB(truecolour.bg.r, truecolour.bg.g, truecolour.bg.b);
|
||||
else
|
||||
bg = colours[nbg];
|
||||
|
Loading…
x
Reference in New Issue
Block a user