It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hello Linux gamers!

I’m wondering if some of you use a XBox 360 controller for WINE games, and if so do you have some tips to share for configuring it?

I’ve always been more of a keyboard + mouse gamer (mostly addicted to real-time strategy games), but for some games I think my experience would be improved by using a controller. So any help on this side would me most apprciated ;)

-----

A working solution has been given by immi101:
avatar
muntdefems: The reason seems to be that Xinput support is not yet implemented in Wine.
avatar
immi101: it is implemented (at least to some extend). if your wine is built with SDL2 support it should pick up your gamepad automatically. Assuming it is working under linux of course :).
For the xbox 360 controller you either need the 'xpad' kernel module or 'xboxdrv' which works in userspace.

//edit:
it is a rather recent addition (though I don't recall when exactly it was added), but somewhere after 3.0 I think

//edit2:
for a quick test: grab XInputTest (from here for example) and just launch it with an up-to-date development version of wine

check the debug output with WINEDEBUG=plugplay if things don't work
Post edited July 08, 2018 by vv221
I own a shitty Xbox360 controller clone, and I've never got it to work with Wine. Apparently x360ce should make (almost) any controller work, but I've got no luck with it so far.

The reason seems to be that Xinput support is not yet implemented in Wine. But a quick Google search has brought me this: https://github.com/KoKuToru/koku-xinput-wine

I think I'll just give it a go.
avatar
muntdefems: The reason seems to be that Xinput support is not yet implemented in Wine. But a quick Google search has brought me this: https://github.com/KoKuToru/koku-xinput-wine
Not having to use a custom build of WINE is great, please share your feedback here if you give it a try.
Post edited July 08, 2018 by vv221
I used a clone controller too, but yeah. Xinput is the issue. Then I got one of these, and it can start up in one of 4 modes, so there's not been a problem since. (I have the SFC30 Pro.)
avatar
Darvond: I used a clone controller too, but yeah. Xinput is the issue.
Thanks for the confirmation. Good to know that they work well for WINE games on Linux, but there is no way I’m buying a new controller ;)
avatar
muntdefems: The reason seems to be that Xinput support is not yet implemented in Wine.
it is implemented (at least to some extend). if your wine is built with SDL2 support it should pick up your gamepad automatically. Assuming it is working under linux of course :).
For the xbox 360 controller you either need the 'xpad' kernel module or 'xboxdrv' which works in userspace.

//edit:
it is a rather recent addition (though I don't recall when exactly it was added), but somewhere after 3.0 I think

//edit2:
for a quick test: grab XInputTest (from here for example) and just launch it with an up-to-date development version of wine

check the debug output with WINEDEBUG=plugplay if things don't work
Post edited July 08, 2018 by immi101
avatar
immi101: if your wine is built with SDL2 support it should pick up your gamepad automatically. Assuming it is working under linux of course :).
I’m currently using wine-staging 3.11 (built with SDL 2 support), and my controller is working out of the box on native games, so I guess I should check if it works on some WINE games.
Last time I gave it a try was probably before SDL 2 support made its way to WINE (pre 3.0), so maybe everything already works as intended on my system and I just don’t know it yet…

-----

Using 'wine control', I got confirmation that my controller is detected and works well.
Sadly in my first test (Evoland, Humble Bundle version) it still doesn’t work… But now I know that I most probably need to do my research on a game basis, as WINE seems to do its job,

-----

As a further confirmation, Jade Empire (GOG version) runs without any issue with my controller.
Post edited July 08, 2018 by vv221
avatar
immi101: it is implemented (at least to some extend). if your wine is built with SDL2 support it should pick up your gamepad automatically. Assuming it is working under linux of course :).
For the xbox 360 controller you either need the 'xpad' kernel module or 'xboxdrv' which works in userspace.

//edit:
it is a rather recent addition (though I don't recall when exactly it was added), but somewhere after 3.0 I think

//edit2:
for a quick test: grab XInputTest (from here for example) and just launch it with an up-to-date development version of wine

check the debug output with WINEDEBUG=plugplay if things don't work
What do you know! Guess I hadn't tested my controller with Windows games in a while, 'cos now it works! Thanks, immi101! :D

Well, I tried a couple of GOG games, and not all of them detected my gamepad. Evoland (already mentioned by vv221 above) and Yono and the Celestial Elephants didn't work, but others did, like Aqua Kitty, Downwell, Hob, and even Brothers: A Tale of Two Sons. :)
Post edited July 08, 2018 by muntdefems
avatar
Darvond: I used a clone controller too, but yeah. Xinput is the issue. Then I got one of these, and it can start up in one of 4 modes, so there's not been a problem since. (I have the SFC30 Pro.)
Looking through their catalog Im not actually sure what one is the SFC30 Pro. I see SN models, but no SFC. Is it one of the ones with analog sticks? With most 3rd party controllers I have used, pushing the stick half-way or so will register has having the stick all the way tilted. This is the probably the biggest reason I don't mess with 3rd party controllers. Those don't look like budget models though. How are their analog sticks?
avatar
MobiusArcher: Looking through their catalog Im not actually sure what one is the SFC30 Pro. I see SN models, but no SFC. Is it one of the ones with analog sticks? With most 3rd party controllers I have used, pushing the stick half-way or so will register has having the stick all the way tilted. This is the probably the biggest reason I don't mess with 3rd party controllers. Those don't look like budget models though. How are their analog sticks?
Here you are.

As for how the sticks function, I'd say you'd have to push them out about ¾ of the way to push them on the wall, and nearly all the way out for diagonals. I suppose that equates to not having much a deadzone, at least according to Dolphin.

As for the actual feel, they're the soft rubber feel, like the PS4 sticks. In as much as I understand, that's what they literally are. They have a nice return and spring to them, a little resistant.

They aren't budget, but they're cheaper than actual controllers.
avatar
Darvond: They aren't budget, but they're cheaper than actual controllers.
Thanks for the info. I might try one of these out. I don't know if it will take the place of my Xbox controller for general use, but It might be nice to have one for more d-pad oriented games. Plus, it looks like you can get a smart phone clip for it, and I think I need that.
avatar
MobiusArcher: Thanks for the info. I might try one of these out. I don't know if it will take the place of my Xbox controller for general use, but It might be nice to have one for more d-pad oriented games. Plus, it looks like you can get a smart phone clip for it, and I think I need that.
Yeah, it works great with bluetooth, and there's various mods you can start it in with a simple button combo. Android, PS4, Xbox and Dinput.
avatar
vv221: Using 'wine control', I got confirmation that my controller is detected and works well.
Sadly in my first test (Evoland, Humble Bundle version) it still doesn’t work… But now I know that I most probably need to do my research on a game basis, as WINE seems to do its job,
note that there are two APIs to use gamepads under Windows: DirectInput and XInput.
The former is old (or even ancient :p) and works very well under wine. So for most older games gamepad support should not be a problem. The controller configuration under 'wine control' is only for DirectInput. DirectInput support in wine is implemented by directly talking to /dev/input/jsX and /dev/input/eventX, no other dependency required.
XInput was developed by MS as successor(*) for DirectInput and is used by many newer games.(though some may even support both APIs). Support for XInput was only recently added to wine as I mentioned above and relies on SDL2 to talk to the gamepad.
I would guess that Jade Empire is still a DirectInput game given its age.

going by your and muntdefems' testing there are still some problems left with XInput :/

going through some of my games - we can add Limbo and Spelunky to the 'it's working' list


* since XInput (for weird reasons) only supports gamepads, games still use DirectInput for Mouse/Keyboard support
Post edited July 08, 2018 by immi101
avatar
immi101: (…)
Do you have a rough estimate of when most games switched to XInput?

Overlord is another game working flawlessly with a controller, but being a 2007 game I think it might be using the same input method than Jade Empire (a 2005 game).
avatar
immi101: (…)
avatar
vv221: Do you have a rough estimate of when most games switched to XInput?
hm, hard to say. I wouldn't expect XInput in a game before 2008/2009, but tbh I don't know when exactly MS introduced XInput. I might be off by a few years.

I think it is easier to look if the game in question loads any of the xinput dlls by running the game with WINEDEBUG=loaddll, ie. 'WINEDEBUG=loaddll wine game.exe'.
Then look in the output for "xinput1_1.dll", "xinput1_2.dll" or similar (there a few of those).