1 Dec
2022
1 Dec
'22
2:58 p.m.
hmm I did not expect GetConsoleMode to fail: another shell console quirk :-( maybe would this work better: ``` #include "condrv.h" .... /* detect shell console handle, and don't return an error */ if (status == STATUS_OBJECT_TYPE_MISMATCH) { IO_STATUS_BLOCK io; if (!NtDeviceIoControlFile( handle, NULL, NULL, NULL, &io, IOCTL_CONDRV_IS_UNIX, NULL, 0, NULL, 0 )) { WARN("Workaround for redirection at unix side.\n"); memset(info, 0, sizeof(*info)); return TRUE; } } ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1626#note_18259