#228 Wine Gamepad setup

Closed
opened 2 years ago by Alex72 · 3 comments
Alex72 commented 2 years ago

Just for anyone who'll encounter a similar problem.

Had a go at GI today with a gamepad (some Xbox knockoff). To my big surprise, gamepad was working very fine both via USB and Bluetooth except for one small problem: right stick wasn't detected.

Spent quite a while to figure out the problem and the solution for it. wine regedit tricks didn't help me.

That solved my problem was setting the environment variable SDL_GAMECONTROLLERCONFIG to some very obscure value.

This value can be generated by:

gcc `sdl2-config --libs --cflags` controllermap.c -o controllermap

EDIT by Krock: For Dualsense controllers, check #216 . EDIT2 by Krock: Fix compile instructions formatting

Just for anyone who'll encounter a similar problem. Had a go at GI today with a gamepad (some Xbox knockoff). To my big surprise, gamepad was working very fine both via USB and Bluetooth except for one small problem: right stick wasn't detected. Spent quite a while to figure out the problem and the solution for it. `wine regedit` tricks didn't help me. That solved my problem was setting the environment variable `SDL_GAMECONTROLLERCONFIG` to some very obscure value. This value can be generated by: - `controllermap` SDL2 test tool (https://github.com/libsdl-org/SDL/blob/main/test/controllermap.c), compile with ``` gcc `sdl2-config --libs --cflags` controllermap.c -o controllermap ``` - Open-source SDL2 Gamepad Mapper https://gitlab.com/ryochan7/sdl2-gamepad-mapper (didn't work for me), and - SDL2 Gamepad Tool https://www.generalarcade.com/gamepadtool (but it is proprietary, use at your own risk!). --- EDIT by Krock: For Dualsense controllers, check https://notabug.org/Krock/dawn/issues/216#issuecomment-28579 . EDIT2 by Krock: Fix compile instructions formatting
Krock commented 2 years ago
Owner

This and the information from #216 should be shared with people outside this project as well.

Do you happen to know of a place where this information would fit best? A Wine/Lutris/Proton wiki, or perhaps a blog post? If there is any such public article, I would like to link it within the troubleshooting document.

This and the information from #216 should be shared with people outside this project as well. Do you happen to know of a place where this information would fit best? A Wine/Lutris/Proton wiki, or perhaps a blog post? If there is any such public article, I would like to link it within the troubleshooting document.
Alex72 commented 2 years ago
Poster

To be honest, IDK. I think it's fine as it is right now, but posting it somewhere more accessible would be definetly good.

To be honest, IDK. I think it's fine as it is right now, but posting it somewhere more accessible would be definetly good.
Krock commented 2 years ago
Owner

Thank you very much for this input. It's not documented in INSTALLATION.md -> 4e100ba

Thank you very much for this input. It's not documented in INSTALLATION.md -> 4e100ba
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.