SDL_OpenSensor

Open a sensor for use.

Header File

Defined in <SDL3/SDL_sensor.h>

Syntax

SDL_Sensor * SDL_OpenSensor(SDL_SensorID instance_id);

Function Parameters

SDL_SensorID instance_id the sensor instance ID.

Return Value

(SDL_Sensor *) Returns an SDL_Sensor object or NULL on failure; call SDL_GetError() for more information.

Version

This function is available since SDL 3.2.0.


CategoryAPI, CategoryAPIFunction, CategorySensor