eric pouech (@epo) commented about programs/cmd/batch.c:
DWORD i; + DWORD conmode, oldconmode; + CONSOLE_READCONSOLE_CONTROL control; + + GetConsoleMode(h, &oldconmode); + conmode = oldconmode & ~ENABLE_PROCESSED_INPUT; + SetConsoleMode(h, conmode); + control.nLength = sizeof(CONSOLE_READCONSOLE_CONTROL); + control.nInitialChars = 0; + control.dwCtrlWakeupMask = 0x0008; + control.dwConsoleKeyState = 0;
/* We can't use the native f* functions because of the filename syntax differences between DOS and Unix. Also need to lose the LF (or CRLF) from the line. */
- if (VerifyConsoleIoHandle(h) && ReadConsoleW(h, buf, noChars, &charsRead, NULL) && charsRead) { we can get rid of VerifyConsoleHandle() as GetConsoleMode() succeeded
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7586#note_98053