We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, my 1st issue.
I have setup my console terminal (TCC from JPsoft) to use blue background on Win-10. Running both examples programs, the colours look awful:
examples
With a little patch to acutest_colored_printf_(), it could look a bit nicer:
acutest_colored_printf_()
Here is my patch:
--- a/include/acutest.h 2024-10-31 11:23:21 +++ b/include/acutest.h 2024-10-31 11:29:49 @@ -628,8 +628,10 @@ case ACUTEST_COLOR_YELLOW_INTENSIVE_: attr = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY; break; default: attr = 0; break; } - if(attr != 0) + if(attr != 0) { + attr |= (info.wAttributes & ~7); /* mask in the default background colour */ SetConsoleTextAttribute(h, attr); + } n = printf("%s", buffer); SetConsoleTextAttribute(h, info.wAttributes); return n;
Another option would be to detect if ANSI-sequences are supported:
DWORD mode = 0; GetConsoleMode (h, &mode); bool okay = (mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING);
if okay set colours as for ACUTEST_UNIX_.
okay
ACUTEST_UNIX_
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, my 1st issue.
I have setup my console terminal (TCC from JPsoft) to use blue background on Win-10.
Running both
examples
programs, the colours look awful:With a little patch to
acutest_colored_printf_()
, it could look a bit nicer:Here is my patch:
Another option would be to detect if ANSI-sequences are supported:
if
okay
set colours as forACUTEST_UNIX_
.The text was updated successfully, but these errors were encountered: