diff options
-rw-r--r-- | hicn-light/src/command_line/controller/hicnLightControl_main.c | 4 | ||||
-rw-r--r-- | hicn-light/src/command_line/daemon/hicnLightDaemon_main.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/hicn-light/src/command_line/controller/hicnLightControl_main.c b/hicn-light/src/command_line/controller/hicnLightControl_main.c index 3d6f0bdbf..b43789fe5 100644 --- a/hicn-light/src/command_line/controller/hicnLightControl_main.c +++ b/hicn-light/src/command_line/controller/hicnLightControl_main.c @@ -103,10 +103,10 @@ static void _printWhite(const char *output) { HANDLE hConsole = NULL; WORD currentConsoleAttr; CONSOLE_SCREEN_BUFFER_INFO csbi; - SetConsoleTextAttribute(hConsole, 7); + hConsole = GetStdHandle(STD_OUTPUT_HANDLE); if (GetConsoleScreenBufferInfo(hConsole, &csbi)) currentConsoleAttr = csbi.wAttributes; - hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + SetConsoleTextAttribute(hConsole, 7); printf("%s", output); SetConsoleTextAttribute(hConsole, currentConsoleAttr); #endif diff --git a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c index 9a6c352fb..39e57ad9e 100644 --- a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c +++ b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c @@ -43,9 +43,9 @@ static void _printRed(const char *output) { HANDLE hConsole = NULL; WORD currentConsoleAttr; CONSOLE_SCREEN_BUFFER_INFO csbi; + hConsole = GetStdHandle(STD_OUTPUT_HANDLE); if (GetConsoleScreenBufferInfo(hConsole, &csbi)) currentConsoleAttr = csbi.wAttributes; - hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, 4); printf("%s", output); SetConsoleTextAttribute(hConsole, currentConsoleAttr); @@ -59,9 +59,9 @@ static void _printWhite(const char *output) { HANDLE hConsole = NULL; WORD currentConsoleAttr; CONSOLE_SCREEN_BUFFER_INFO csbi; + hConsole = GetStdHandle(STD_OUTPUT_HANDLE); if (GetConsoleScreenBufferInfo(hConsole, &csbi)) currentConsoleAttr = csbi.wAttributes; - hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, 7); printf("%s", output); SetConsoleTextAttribute(hConsole, currentConsoleAttr); |