Enable 256 color-mode only if VT sequences are available.

This commit is contained in:
William McBrine
2018-02-07 00:39:06 -05:00
parent 3a671cded3
commit bdeaf04a5f

View File

@@ -89,7 +89,16 @@ void PDC_set_title(const char *title)
int PDC_set_blink(bool blinkon)
{
if (pdc_color_started)
COLORS = 256;
{
COLORS = 16;
if (PDC_can_change_color()) // is_nt
{
if (SetConsoleMode(pdc_con_out, 0x0004)) // VT
COLORS = 256;
SetConsoleMode(pdc_con_out, 0x0010); // LVB
}
}
if (blinkon)
{