mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-23 15:25:01 +00:00
Enable 256 color-mode only if VT sequences are available.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user