Closed drfiemost closed 2 years ago
Heads-up, this is working fine with my namebrand Logitech controller, but on my no-name generic SNES pad from Amazon, the start button still does not do anything.
Is this just a limitation of the controller itself? I don't really know what "SDL" is or means; is it just that some controllers are compatible with it and some are not, or, how does this work? (Just wondering out loud, here, you don't have to teach me "how it works.")
You have to create a mapping using SDL2 Gamepad Mapper, if you're lucky it's already included in the SDL_GameControllerDB Anyway you need a file with the mapping string for your controller and set the environment variable SDL_GAMECONTROLLERCONFIG to point to that file. (I haven't tried this so YMMV)
The SDL library has its own embedded configuration: https://github.com/libsdl-org/SDL/blob/main/src/joystick/SDL_gamecontrollerdb.h
And now we have force-feedback too!
FF working here 👍
Anyway you need a file with the mapping string for your controller and set the environment variable SDL_GAMECONTROLLERCONFIG to point to that file. (I haven't tried this so YMMV)
Had to use a different tool but I generated a mapping string and set the environment variable, and the cheap Amazon SNES pad works now too!
That's good to hear! Tried with an xbox controller and it works fine out of the box. Now we have full features while retaining backward compatibility so this one can be closed.
Port to new SDL_GameController API to have a consistent experience with game controllers, see #7 Maybe take the chance to get rid of old SDL too?
Edit: also implement force-feedback support