1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-17 03:50:03 +02:00

console_win32.cpp: use isColorsSupported() instead of disable_color

This commit is contained in:
Henrik Hautakoski 2020-03-02 14:38:25 +01:00
parent f630a8344c
commit 26b96add30

View file

@ -50,7 +50,7 @@ namespace console {
std::ostream& reset(std::ostream& os) {
if (disable_color == false) {
if (isColorsSupported(os)) {
::SetConsoleTextAttribute(::GetStdHandle(STD_OUTPUT_HANDLE), FG_DEFAULT);
}
return os;
@ -61,7 +61,7 @@ std::ostream& operator<<(std::ostream& os, const fg& obj) {
int code;
if (disable_color == false) {
if (isColorsSupported(os)) {
switch(obj._color) {
case black : code = FG_BLACK; break;