DOKK / manpages / debian 13 / libsdl3-doc / SDL_OpenJoystick.3.en
SDL_OpenJoystick(3) SDL3 FUNCTIONS SDL_OpenJoystick(3)

SDL_OpenJoystick - Open a joystick for use.

Defined in SDL3/SDL_joystick.h

#include "SDL3/SDL.h"
SDL_Joystick * SDL_OpenJoystick(SDL_JoystickID instance_id);

The joystick subsystem must be initialized before a joystick can be opened for use.

the joystick instance ID.

( SDL_Joystick
*) Returns a joystick identifier or NULL on failure; call SDL_GetError () for more information.

This function is available since SDL 3.2.0.

(3), SDL_CloseJoystick(3)

SDL 3.2.10 Simple Directmedia Layer