https://bugs.winehq.org/show_bug.cgi?id=46361
--- Comment #33 from imbert.jacquesolivier@gmail.com --- I will not send again the same thing: you already have the information before. I want to help a community, but there is no writing "idiot" on my forehead. Because there it is not necessary to exaggerate with all that I gave you: -> with the test via packages to install manually because your official repository is poorly built -> with the dependencies of these packages that have no logic -> with the installation, a failure via the binaries of the game launch -> then the attempt to recompile via the sources to not be bad time (1 day of compilation!) -> then the crash of Wine with the sending each time of the log then analyzes but which are not taken into account in the final
The problem comes from changing your "Joystick" API ! And Valve understood it very well in their fork called Proton.
Because yes, I was curiously tested version 4.2-1 of Proton yesterday (https://github.com/ValveSoftware/Proton/releases/tag/proton-4.2-1 - https://github.com/ValveSoftware/Proton/tree/proton-4.2-1 ), and to my surprise, the USB controllers work without issue on Sonic Mania and other games I was concerned about (like the game Rabi-Ribi)
I consulted their sources comparing them with your 4.2 version of Wine. And there is for example a file called joystick_sdl.c and other changes in the folder "dinput" and "dinput8".
Now you can compare the sources of Proton 4.2-1 and your sources of wine-4.2 and correct the support of USB and other controllers. Because just like you, I also have forks and projects to update.
It's still crazy to be forced to use / create forks of an open source software to use it correctly ...