/* Get the device index of an opened joystick.  */
int SDL_JoystickIndex(SDL_Joystick *joystick)
/* Get the device index of an opened joystick.  */
int SDL_JoystickIndex(SDL_Joystick *joystick)
{
	if ( ! ValidJoystick(&joystick) ) {
		return(-1);
	}
	return(joystick->index);
}