SDL_Joystick is part of SDL, so when SDL works, it works as well
The buttons are seen as the following keyboard events:
* D-PAD Left - SDLK_LEFT
* D-PAD Right - SDLK_RIGHT
* D-PAD Up - SDLK_UP
* D-PAD Down - SDLK_DOWN
* Y button - SDLK_SPACE
* X button - SDLK_LSHIFT
* A button - SDLK_LCTRL
* B button - SDLK_LALT
* START button - SDLK_RETURN
* SELECT button - SDLK_ESC
* L shoulder - SDLK_TAB
* R shoulder - SDLK_BACKSPACE
* Power slider in up position - SDLK_POWER (not encouraged to map in game, as it's used by the pwswd daemon)
* Power slider in down position - SDLK_PAUSE
The analog nub is a joystick device. When no external USB gamepads are plugged, it is joystick #0. When USB gamepads are connected, it is not guaranteed to be joystick #0, so it's advised to check the device number with a different method (ie. joystick device name string).
More about joysticks in SDL 1.2 here:
http://sdl.beuc.net/sdl.wiki/Handling_Joysticks