On Thu Jun 8 14:40:57 2023 +0000, Zhiyi Zhang wrote:
CONSOLE_HANDLE_SHELL_NO_WINDOW is enough for the game. For example, see https://gitlab.winehq.org/wine/wine/-/merge_requests/2986
@Jacek: no it doesn't suffice to restrict to shell_no_window. The game fails also when the launcher is run attached to the unix console ( == conhost --unix)
AFAICS under windows, a GUI doesn't inherit its parent process' console (whatever the createprocess flags) and its process param's ConsoleHandle is always to NULL (cf kernel32/tests/console.c test_CreateProcessCUI)
we do inherit in wine the console handle for keeping the link to unix console (or its absence for shell_no_window).
AllocConsole will fail if already attached to a "genuine" console, but will fake that the unix console (conhost --unix or shell_no_window) shouldn't have been inherited