Skip to content

Support writing logs to Git-Bash mintty terminal; reduce the number of "GetStdHandle()" calls #35

New issue

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pzhlkj6612
Copy link

Hello!

In some terminals (e.g., mintty from Git-Bash), WriteConsole(h, ...) writes NOTHING because GetFileType(h) is FILE_TYPE_PIPE instead of FILE_TYPE_CHAR. I don't know the exact reason, but switching to WriteFile(h, ...) does solve the issue and does not break anything if it's in other terminals (e.g., conhost.exe or Windows Terminal - they are FILE_TYPE_CHAR).

Please test my changes.

My test video:

20250501-yr-patches-gamemd-spawner-git-bash-mintty-console-issue-handle-type.mp4

Test environment:

  • Windows 11 10.0.26100.1742
  • mintty '3.7.7' de5cc9f8 of Git-Bash from Git 2.49.0

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant