---
name: "SDL_JoystickNumButtons"
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_JoystickNumButtons"
---

# SDL\_JoystickNumButtons(3)

Get the number of joysitck buttons

## NAME

SDL\_JoystickNumButtons - Get the number of joysitck buttons

## SYNOPSIS

**#include "SDL.h"**

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

## DESCRIPTION

Return the number of buttons available from a previously opened **SDL\_Joystick**.

## RETURN VALUE

Number of buttons.

## SEE ALSO

**SDL\_JoystickGetButton**, **SDL\_JoystickOpen**
