Support writing logs to Git-Bash mintty terminal; reduce the number of "GetStdHandle()" calls #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
In some terminals (e.g., mintty from Git-Bash),
WriteConsole(h, ...)
writes NOTHING becauseGetFileType(h)
isFILE_TYPE_PIPE
instead ofFILE_TYPE_CHAR
. I don't know the exact reason, but switching toWriteFile(h, ...)
does solve the issue and does not break anything if it's in other terminals (e.g., conhost.exe or Windows Terminal - they areFILE_TYPE_CHAR
).Please test my changes.
My test video:
20250501-yr-patches-gamemd-spawner-git-bash-mintty-console-issue-handle-type.mp4
Test environment:
.