[common] debug: add color support to debug messages

People often miss the warnings about invalid arguments in their command
line, this last minute patch attempts to address this by making
warnings, errors, fixme's and fatal errors stand out if stdout is a TTY.
This commit is contained in:
Geoffrey McRae
2021-07-07 23:05:46 +10:00
parent ada6ada576
commit 1effd5fddc
8 changed files with 126 additions and 9 deletions

View File

@@ -314,6 +314,9 @@ fail:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
// initialize for DEBUG_* macros
debug_init();
// convert the command line to the standard argc and argv
LPWSTR * wargv = CommandLineToArgvW(GetCommandLineW(), &app.argc);
app.argv = malloc(sizeof(char *) * app.argc);