Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Easier Game Controller Input in SDL with SDL_GameController

Easier Game Controller Input in SDL with SDL_GameController

James Grimwood
James Grimwood
James Grimwood · · 1 min read
455 0

Game controllers on computers are somewhat irritating to manage compared to a console. Has the user plugged in an XBox controller? A PS4 controller, or have they obtained some random USB controller they found on eBay? Coping with this in SDL was difficult, with SDL just telling you “button 13 pressed” or “joystick axis 4 moved”, which is great except all your code really wants to know is “did the user just press the A button?

View the full article

Discussion

Loading comments...