https://bugs.winehq.org/show_bug.cgi?id=52222
Bug ID: 52222 Summary: WINEDLLOVERRIDES="DINPUT8.dll=n,b" no longer works since 4f1095a, worked in V6.23. Product: Wine Version: 7.0-rc1 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winmm&mci Assignee: wine-bugs@winehq.org Reporter: billfleming11@gmail.com Distribution: ---
Zebediah pointed out where this new bug was and I confirmed the regression with a minor code modification. See his comments here for the program I first saw the regression against. https://bugs.winehq.org/show_bug.cgi?id=51409#c7
In Wine 3.X, 4.X, 5.X, 6.X we have been able to supply modified DLLs (for example that some games require to load a translation or a mod to fix bugs, etc) in the game's directory and override the built-in DLL to load the modification hook into the application. From 4f1095a on-wards dinput8 became an IMPORT requirement of winmm makefile leading to the following error in wine, before it even really attempts to load the application.
LdrInitializeThunk "WINMM.dll" failed to initialize, aborting
I can modify wine 7.0-rc1 to allow the dll to load again, making the game playable other than any lingering video playback issues it has. In dlls/winmm/Makefile.in I modified the IMPORTS line to remove dinput8. In dlls/winmm/joystick.c I commented out the contents of the void joystick_load( HINSTANCE instance ) function. (lines 157 to 159 as of 7.0-rc1).
Then after rebuilding wine the application will launch again using WINEDLLOVERRIDES="DINPUT8.dll=n,b"
Note that this regression will affect a large number of video games as it is almost universal to "hook" into a game using DINPUT8.dll specifically, as apposed to other possible DLLs.
If anyone really wants to look at a log file I put one here in the old report. https://bugs.winehq.org/attachment.cgi?id=71302
Note that at least in this one game my xbox 1 controller still works with xow after removing those lines, but someone who knows what they are doing should propose a new patch relating to joysticks.
https://bugs.winehq.org/show_bug.cgi?id=52222
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |4f1095a0ee4c7577e5287e56e38 | |8c36d0ba659ad Keywords| |regression CC| |rbernon@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=52222
Bill Fleming billfleming11@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |ArchLinux Keywords|regression |
https://bugs.winehq.org/show_bug.cgi?id=52222
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=52222
--- Comment #1 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 71307 --> https://bugs.winehq.org/attachment.cgi?id=71307 Delay load dinput8
https://bugs.winehq.org/show_bug.cgi?id=52222
--- Comment #2 from Rémi Bernon rbernon@codeweavers.com --- Could you try if this patch solves the issue as well?
https://bugs.winehq.org/show_bug.cgi?id=52222
--- Comment #3 from Bill Fleming billfleming11@gmail.com --- Created attachment 71315 --> https://bugs.winehq.org/attachment.cgi?id=71315 DELAYIMPORTS dinput8 doesn't fix the problem
The patch to DELAYIMPORTS dinput8 doesn't fix the problem.
https://bugs.winehq.org/show_bug.cgi?id=52222
--- Comment #4 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 71316 --> https://bugs.winehq.org/attachment.cgi?id=71316 Create dinput8 instance through COM
Thanks, I'm a bit surprised as I don't expect the DLL to be loaded right away if DELAYIMPORTS is used although it looks like it's what it is doing. Maybe it didn't actually take the changes into account if it's only the Makefile.in that is modified? Could you confirm with touching dlls/winmm/joystick.c as well?
Then if it's really not enough, maybe something like this other patch instead?
https://bugs.winehq.org/show_bug.cgi?id=52222
--- Comment #5 from Bill Fleming billfleming11@gmail.com --- Created attachment 71327 --> https://bugs.winehq.org/attachment.cgi?id=71327 logfile of dinput8 instance through COM method
The problem is fixed now. I have attached a WINEDEBUG=+dll,+module,+winmm,+dinput log file also. Controller works also. Thanks.
https://bugs.winehq.org/show_bug.cgi?id=52222
--- Comment #6 from Rémi Bernon rbernon@codeweavers.com --- Thanks, although Paul rightfully noted on the mailing list that COM involves tricky details that we may want to avoid here.
I think I was looking at an invalid version of the code before and didn't see that winmm is actually creating a dinput instance at load time, I believe that's what made the delay load behave exactly like the non-delay load version.
With some added lazy loading I think it should work fine.
https://bugs.winehq.org/show_bug.cgi?id=52222
Johnny Robeson johnny@localmomentum.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |johnny@localmomentum.net
https://bugs.winehq.org/show_bug.cgi?id=52222
--- Comment #7 from Bill Fleming billfleming11@gmail.com --- Created attachment 71392 --> https://bugs.winehq.org/attachment.cgi?id=71392 Log of wine-7.0-rc2-41-gd03984709d8
Game loads on latest master with Remi's e928225 patch from Tuesday. Tested 2 different games with dinput8 dll successfully.
https://bugs.winehq.org/show_bug.cgi?id=52222
Bill Fleming billfleming11@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #8 from Bill Fleming billfleming11@gmail.com --- Fixed with https://source.winehq.org/git/wine.git/commit/e9282254c6824c4387d3a6368c7fb8...
https://bugs.winehq.org/show_bug.cgi?id=52222
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e9282254c6824c4387d3a6368c7 | |fb8ca44aeef53
https://bugs.winehq.org/show_bug.cgi?id=52222
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.0-rc3.