mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-26 00:55:19 +08:00
chg: trigger colorsmode (proxspace) in direct calls to client
This commit is contained in:
parent
a5b406bffa
commit
c2df7ed824
1 changed files with 8 additions and 3 deletions
|
@ -641,7 +641,6 @@ finish2:
|
|||
|
||||
#if defined(_WIN32)
|
||||
static bool DetectWindowsAnsiSupport(void) {
|
||||
bool ret = false;
|
||||
HKEY hKey = NULL;
|
||||
bool virtualTerminalLevelSet = false;
|
||||
bool forceV2Set = false;
|
||||
|
@ -681,9 +680,15 @@ static bool DetectWindowsAnsiSupport(void) {
|
|||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
DWORD dwMode = 0;
|
||||
GetConsoleMode(hOut, &dwMode);
|
||||
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
SetConsoleMode(hOut, dwMode);
|
||||
|
||||
// If both VirtualTerminalLevel and ForceV2 is set, AnsiColor should work
|
||||
ret = virtualTerminalLevelSet && forceV2Set;
|
||||
return ret;
|
||||
return virtualTerminalLevelSet && forceV2Set;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue