http://bugs.winehq.org/show_bug.cgi?id=10979
--- Comment #5 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-05-02 02:06:09 --- Created an attachment (id=12636) --> (http://bugs.winehq.org/attachment.cgi?id=12636) a patch to user32/winpos.c
The chain of events for FS2.exe leading up to the hang,
FS.exe suspends the thread that the window belongs to using SuspendThread (not a recommended practice) FS.exe uses ddraw to change the display mode to 640x480
wine calls DirectDrawImpl_SetDisplayModeNoOverride - ddraw/ddraw.c IWineD3DDeviceImpl_SetDisplayMode - wined3d/device.c MoveWindow - user32/winpos.c SetWindowPos - user32/winpos.c SendMessageW( winpos.hwnd, WM_WINE_SETWINDOWPOS, 0, (LPARAM)&winpos );
the WM_WINE_SETWINDOWPOS is sent to the hwnd in the thread that was suspended by FS.exe which causes the call to SendMessageW to block because the message is not processed.
Replacing SendMessageW with SendMessageTimeoutW as per the attached patch, the game starts instead of hanging.
if testing you may notice an unrelated issue, the game's audio thread crashes in the lobby but it can be avoided if you use a native msadp32.acm