I noticed the controller wasn’t working on my Linux build and spent some time researching the problem. Looks like I need to read in the gamecontrollerdb.txt file for the controller mappings. This seems to be automatic in Windows. Could it be because I have Steam installed? The Linux I’m running on is my own home brew Linux build so I don’t know if that’s a problem or not. I’m using the xfce4 desktop.
Well, as you can imagine, calling SDL_GameControllerAddMappingsFromFile(“gamecontrollerdb.txt”); did solve the problem. I call this right before I start checking for installed controllers on start up. At first, I didn’t think this was working but yet I pass the SDL_IsGameController() check. What I discovered by accident is if I minimize the game window and bring it back up, the controller is now working as expected and I can see the message output that I’m printing to the terminal window. Odd.