I changed Valve's code a little bit to make it compatible with this older version of Wine (namely dlls/win32u/message.c seems to have moved in some form to dlls/user32/message.c, and send_message got renamed to SendMessageW)
I'm not familiar with the Wine source code and it's not been since uni I've touched C, so I simplified Valve's code a little bit to get it compiling by removing references/uses of enable_mouse_in_pointer.
I didn't spend a huge deal of time investigating/learning this, but I couldn't get that variable to be set and used across the different files. Functionally it's equivalent, as enable_mouse_in_pointer is always true, but presumably that was put in place by Valve for future proofing reasons where that variable may be changed at runtime.
Most important caveat! (and also likely due to my lacking Wine source code knowledge and rusty C skills)
When I used my fork's Library build artifact as-is (backing up the old ~/Application Support/com.isaacmarovitz.Whisky/Libraries), it did not work. Steam would hang on first boot; then complain about SteamWebHelper; I'd click the Restart Steam button; Steam would open about a minute later; Civ wouldn't even launch at this stage.
However... when I used the untouched ~/Application Support/com.isaacmarovitz.Whisky/Libraries and just copied over from the fork's Library artifact the two DLLs seemingly modified by Valve's patch (user32 and win32u, 2 libs, but 8 files in total due to 4 architectures) to ~/Application Support/com.isaacmarovitz.Whisky/Libraries/Wine/lib/wine/*, it suddenly worked as normal whilst also fixing the mouse clicking issue! 🙂
Steps to reproduce
My steps were
On latest Whiskey (2.3.3 at time of writing) create a container and install Steam
wineserver: using server-side synchronization.
2024-10-11 21:10:18.303 wine64-preloader[95430:1653378] +[IMKClient subclass]: chose IMKClient_Legacy
2024-10-11 21:10:18.568 wine64-preloader[95426:1653361] +[IMKClient subclass]: chose IMKClient_Legacy
2024-10-11 21:10:18.941 wine64-preloader[95457:1653489] +[IMKClient subclass]: chose IMKClient_Legacy
0100:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@C:\windows\system32\drivers\wineusb.sys,-1" -> L"C:\windows\inf\wineusb.inf"
2024-10-11 21:10:20.754 wine64-preloader[95525:1653665] +[IMKClient subclass]: chose IMKClient_Legacy
wine: configuration in L"/Users/user/Library/Containers/com.isaacmarovitz.Whisky/Bottles/F492A9E3-C23D-49E6-87DF-ED7BBA0099BB" has been updated.
012c:err:ole:com_get_class_object no class object {294935ce-f637-4e7c-a41b-ab255460b862} could be created for context 0x17
02bc:err:seh:call_stack_handlers invalid frame 000000000021F9E8 (0000000000022000-0000000000120000)
"Failed to dlopen D3DMetal"), function D3DRMDispatch_Init_block_invoke, file shared.mm, line 800.
02d4:err:seh:call_stack_handlers invalid frame 000000000021F9E8 (0000000000022000-0000000000120000)
02d4:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
"Failed to dlopen D3DMetal"), function D3DRMDispatch_Init_block_invoke, file shared.mm, line 800.
02f4:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
_invoke, file shared.mm, line 802024-10-11 21:14:20.500 wine64-preloader[3402:1673826] +[IMKClient subclass]: chose IMKClient_Legacy
035c:err:kerberos:kerberos_LsaApInitializePackage no Kerberos support, expect problems
032c:err:ole:com_get_class_object no class object {aa509086-5ca9-4c25-8f95-589d3c07b48a} could be created for context 0x17
Description
Description
When Civ VI is booted up and you reach the main menu, mouse clicks are not registered in the game.
N.B. Issue creation page only allows me to select MacOS 14 and Whiskey 2.3.2 in the dropdowns. I'm actually using MacOS 15.0.1 and Whisky 2.3.3.
Possible Fix
Looking online, it seems to be a known problem.
https://github.com/Frogging-Family/wine-tkg-git/issues/1163 https://bugs.winehq.org/show_bug.cgi?id=51537
However, as mentioned on the winehq.org page, Valve did implement a fix into Proton.
https://github.com/ValveSoftware/wine/commit/ce0c255a1fd40bfa9a1de6f6765b83a4dcf9d0dd
In a fork, I implemented the core of that fix, and it seems to work! Civ now responded to mouse clicks, and I was able to run the game smoothly.
https://github.com/Whisky-App/wine/compare/7.7...IdyllicHappiness:wine-civ6-fix-test:7.7
Some caveats:
dlls/win32u/message.c
seems to have moved in some form todlls/user32/message.c
, andsend_message
got renamed toSendMessageW
)enable_mouse_in_pointer
.enable_mouse_in_pointer
is always true, but presumably that was put in place by Valve for future proofing reasons where that variable may be changed at runtime.~/Application Support/com.isaacmarovitz.Whisky/Libraries
), it did not work. Steam would hang on first boot; then complain about SteamWebHelper; I'd click the Restart Steam button; Steam would open about a minute later; Civ wouldn't even launch at this stage.~/Application Support/com.isaacmarovitz.Whisky/Libraries
and just copied over from the fork's Library artifact the two DLLs seemingly modified by Valve's patch (user32
andwin32u
, 2 libs, but 8 files in total due to 4 architectures) to~/Application Support/com.isaacmarovitz.Whisky/Libraries/Wine/lib/wine/*
, it suddenly worked as normal whilst also fixing the mouse clicking issue! 🙂Steps to reproduce
My steps were
Expected behaviour
Mouse clicks to be registered by the game.
Logs
Whisky Version: 2.3.3 Date: 2024-10-11T20:10:15Z macOS Version: 15.0.1
Bottle Name: Steam Bottle URL: /Users/user/Library/Containers/com.isaacmarovitz.Whisky/Bottles/F492A9E3-C23D-49E6-87DF-ED7BBA0099BB
Wine Version: 7.7.0 Windows Version: win11 Enhanced Sync: none
Metal HUD: false Metal Trace: false
Arguments: start /unix /Users/user/Library/Containers/com.isaacmarovitz.Whisky/Bottles/F492A9E3-C23D-49E6-87DF-ED7BBA0099BB/drive_c/Program Files (x86)/Steam/steam.exe
Environment: { "DXVK_ASYNC" = 1; "GST_DEBUG" = 1; WINEDEBUG = "fixme-all"; WINEPREFIX = "/Users/user/Library/Containers/com.isaacmarovitz.Whisky/Bottles/F492A9E3-C23D-49E6-87DF-ED7BBA0099BB"; }
wineserver: using server-side synchronization. 2024-10-11 21:10:18.303 wine64-preloader[95430:1653378] +[IMKClient subclass]: chose IMKClient_Legacy 2024-10-11 21:10:18.568 wine64-preloader[95426:1653361] +[IMKClient subclass]: chose IMKClient_Legacy 2024-10-11 21:10:18.941 wine64-preloader[95457:1653489] +[IMKClient subclass]: chose IMKClient_Legacy 0100:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@C:\windows\system32\drivers\wineusb.sys,-1" -> L"C:\windows\inf\wineusb.inf" 2024-10-11 21:10:20.754 wine64-preloader[95525:1653665] +[IMKClient subclass]: chose IMKClient_Legacy wine: configuration in L"/Users/user/Library/Containers/com.isaacmarovitz.Whisky/Bottles/F492A9E3-C23D-49E6-87DF-ED7BBA0099BB" has been updated. 012c:err:ole:com_get_class_object no class object {294935ce-f637-4e7c-a41b-ab255460b862} could be created for context 0x17 02bc:err:seh:call_stack_handlers invalid frame 000000000021F9E8 (0000000000022000-0000000000120000) "Failed to dlopen D3DMetal"), function D3DRMDispatch_Init_block_invoke, file shared.mm, line 800. 02d4:err:seh:call_stack_handlers invalid frame 000000000021F9E8 (0000000000022000-0000000000120000) 02d4:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception. "Failed to dlopen D3DMetal"), function D3DRMDispatch_Init_block_invoke, file shared.mm, line 800. 02f4:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception. _invoke, file shared.mm, line 802024-10-11 21:14:20.500 wine64-preloader[3402:1673826] +[IMKClient subclass]: chose IMKClient_Legacy 035c:err:kerberos:kerberos_LsaApInitializePackage no Kerberos support, expect problems 032c:err:ole:com_get_class_object no class object {aa509086-5ca9-4c25-8f95-589d3c07b48a} could be created for context 0x17
What version of Whisky are you using?
2.3.2
What version of macOS are you using?
Sonoma (macOS 14)
Issue Language