Expand description

Lets SDL use various sensors (such as the accelerometer in a phone).

SDL_Init must have been called with the SDL_INIT_SENSOR flag. This causes SDL to scan the system for sensors, and load appropriate drivers.

Structs

SDL’s opaque sensor type.

This is a unique ID for a sensor for the time it is connected to the system.

The different sensors defined by SDL

Constants

Accelerometer

Gyroscope

Returned for an invalid sensor

Unknown sensor type

Accelerometer sensor

Functions

Locking for multi-threaded access to the sensor API.

Count the number of sensors attached to the system right now.

Close a sensor previously opened with SDL_SensorOpen

Return the SDL_Sensor associated with an instance id.

Get the current state of an opened sensor.

Get the instance ID of a sensor.

Get the implementation dependent name of a sensor.

Get the platform dependent type of a sensor.

Get the type of a sensor.

Get the instance ID of a sensor.

Get the implementation dependent name of a sensor.

Get the platform dependent type of a sensor.

Get the type of a sensor.

Open a sensor for use.

Update the current state of the open sensors.