DmC Devil May Cry - Gamepad input is wrong

Questions about Wine on Linux
Locked
OnlySyrup
Newbie
Newbie
Posts: 2
Joined: Sun Feb 17, 2013 9:47 pm

DmC Devil May Cry - Gamepad input is wrong

Post by OnlySyrup » Sun Feb 17, 2013 10:04 pm

I am having some difficulties with DmC Devil May Cry, as the title suggests. I am being confused by how it handles gamepad input. I don't know whether is uses Xinput or Dinput. All I know is that it uses something. (It is also an Unreal Engine 3 game if that is to any help)
The gamepad in question is a Logitech Dual Action. I am using Ubuntu 12.10 64-bit with a wineprefix that is 32-bit and running 1.5.24. The wineprefix has dinput, dinput8, d3d9_43, msvc90, msvc80, msvc100, dotnet40, xinput and perhaps more.
I am aware that there are two joystick devices. I disabled the "event" one in the control panel applet in Wine, and it is in effect. (The "event" one works as it should, but after some time the analog axes lock up, making it impossible to do anything than quitting and restarting the game.) The problem is that the "js" one has a wrongly mapped axis. It is supposed to have X, Y, Z, Rz and POV, but the axis that is supposed for Rz is being used for Rx, which is not used in any game including DmC.
I have attempted to add a registry key in /HKEY_CURRENT_USER/Software/Wine/DirectInput/ for the joystick with a hopefully correct name of "Logitech Logitech Dual Action" and using "X,Y,Z,Rx,POV1" as the string. It has no effect on the game or the control panel applet's test. An app in Wine, Joytester, picks up the "missing" axis as axis R and picks up its movement.
Is there any solution to this? I have no idea what I am supposed to do with this. It seems hopeless, and I am wasting a lot of time running in circles with this.

OnlySyrup
Newbie
Newbie
Posts: 2
Joined: Sun Feb 17, 2013 9:47 pm

Solution

Post by OnlySyrup » Mon Feb 18, 2013 2:44 pm

I'm sorry if I caused any bother, but here is a solution I came up with:

0. Use Wine 1.5.24 and make sure Wine is set to Windows XP. Windows 7 mode seems to break the game when enabled. Also, remove any files from X360CE if they exist in a location where they may affect DmC or the whole installation while running. They are a major problem in this case.
1. Install xinput from winetricks and set xinput1_1, xinput1_2, xinput9_1_0 as disabled in winecfg. (xinput1_3 should be set to native.)
2. Set dinput8 and dinput as built-in. You will likely not have to install their files at all.
3. Disable the event-based joystick in Wine's control panel applet. (You can access it from explorer.exe -> My Computer -> Control panel)
4. Set a registry key in HKEY_CURRENT_USER/Software/Wine/DirectInput with the name of your joystick from *Wine's control panel*. (That is a critical part and is also the reason you want to use something similar to Wine 1.5.24.) It should have the value that describes your joystick's axis mapping. In my case: "Logitech Logitech Dual Action (js)" = "X,Y,Z,Rz,POV1", without the quotes.
5. Test with Wine's control panel applet or anything else that allows you to check on a joystick.

Locked