Steam uses SDL2, pygame uses 1. Maybe it's not the issue, SDL2 docs sounded like it might be:
Joystick events now refer to an SDL_JoystickID. This is because SDL 2.0 can > handle joysticks coming and going, as devices are plugged in and pulled out > during your game's lifetime, so the index into the device list that 1.2 > uses would be meaningless as the available device list changes. > > You should also check out the new Game Controller API > <https://wiki.libsdl.org/CategoryGameController> too, because it's cool, > and maybe you did a lot of tap dancing with the 1.2 API that this new code > would solve more cleanly. You can find it in SDL_gamecontroller.h. The Game > Controller API integrates really nicely with Steam Big Picture Mode: you > get automatic configuration of most controllers, and a nice UI if you have > to manually configure it. In either case, Steam passes this configuration > on to your SDL application > -- Jake