SDL_NumJoysticks (3) - Linux Manuals
SDL_NumJoysticks: Count available joysticks.
NAME
SDL_NumJoysticks - Count available joysticks.SYNOPSIS
#include "SDL.h"
DESCRIPTION
Counts the number of joysticks attached to the system.
RETURN VALUE
Returns the number of attached joysticks
SEE ALSO
SDL_JoystickName, SDL_JoystickOpen