---
name: "SDL_JoystickIndex"
section: "3"
platform: "linux"
package: "libsdl1.2-dev"
version: "1.2.15+dfsg2-8"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_JoystickIndex"
---

# SDL\_JoystickIndex(3)

Get the index of an SDL\_Joystick.

## NAME

SDL\_JoystickIndex - Get the index of an SDL\_Joystick.

## SYNOPSIS

**#include "SDL.h"**

**int SDL\_JoystickIndex**(**SDL\_Joystick \*joystick**);

## DESCRIPTION

Returns the index of a given **SDL\_Joystick** structure.

## RETURN VALUE

Index number of the joystick.

## SEE ALSO

**SDL\_JoystickOpen**
