Files
SDL/examples/input/03-gamepad-polling

This example code looks for the current gamepad state once per frame,
and draws a visual representation of it. See 01-joystick-polling for the
equivalent example code for the lower-level joystick API.