https://bugs.winehq.org/show_bug.cgi?id=50366
Paul Gofman pgofman@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pgofman@codeweavers.com
--- Comment #10 from Paul Gofman pgofman@codeweavers.com --- Created attachment 69137 --> https://bugs.winehq.org/attachment.cgi?id=69137 Hack
I've tested the game.
I could reproduce the issue with creating both LAN and global games. I've bisected that to commit:
commit 02a764e702094572186e079f6d48946627336d03 Author: Zebediah Figura z.figura12@gmail.com Date: Mon Sep 28 22:35:03 2020 -0500
ws2_32: Look for supported socket parameters if any parameters to WSASocket() are zero.
As it already happened with that commit earlier, I didn't find anything wrong with the commit itself. The effect is now getsockopt(..., WS_SO_PROTOCOL_INFOW, ...) fills the protocol information for sockets created without protocol specification to WSASocketW (as it should).
When the game gets the protocol info it chooses another way of working with some sockets. It is now using AFD_RECV, AFD_SELECT ioctls through NtDeviceIoControlFile() with socket handles during multiplayer game creation. I am attaching a very hacky (and incomplete) PoC patch which fixes the hang and an error on the multiplayer game creation, both for LAN and global game. I did not test the actual multiplayer game, it is quite possible that it will still not work with this patch as there are more ioctls to be implemented and even these 2 have a lot of things left behind.
A proper implementation should be probably aligned with moving WS2 async handling to ntdll.