mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-02 11:43:40 +02:00
console_win32.cpp: use isColorsSupported() instead of disable_color
This commit is contained in:
parent
f630a8344c
commit
26b96add30
1 changed files with 2 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ namespace console {
|
||||||
|
|
||||||
std::ostream& reset(std::ostream& os) {
|
std::ostream& reset(std::ostream& os) {
|
||||||
|
|
||||||
if (disable_color == false) {
|
if (isColorsSupported(os)) {
|
||||||
::SetConsoleTextAttribute(::GetStdHandle(STD_OUTPUT_HANDLE), FG_DEFAULT);
|
::SetConsoleTextAttribute(::GetStdHandle(STD_OUTPUT_HANDLE), FG_DEFAULT);
|
||||||
}
|
}
|
||||||
return os;
|
return os;
|
||||||
|
|
@ -61,7 +61,7 @@ std::ostream& operator<<(std::ostream& os, const fg& obj) {
|
||||||
|
|
||||||
int code;
|
int code;
|
||||||
|
|
||||||
if (disable_color == false) {
|
if (isColorsSupported(os)) {
|
||||||
|
|
||||||
switch(obj._color) {
|
switch(obj._color) {
|
||||||
case black : code = FG_BLACK; break;
|
case black : code = FG_BLACK; break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue