Sensor event structure (event.sensor.*)
Defined in [SDL_events.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_events.h), but apps should _only_ `#include "SDL.h"`!
typedef struct SDL_SensorEvent
{/**< ::SDL_SENSORUPDATE */
Uint32 type; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 timestamp; /**< The instance ID of the sensor */
Sint32 which; float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
/**< The timestamp of the sensor reading in microseconds, if the hardware provides this information. */
Uint64 timestamp_us; } SDL_SensorEvent;
Uint32 |
type |
SDL_SENSORUPDATE |
Uint32 |
timestamp |
In milliseconds, populated using SDL_GetTicks() |
Sint32 |
which |
The instance ID of the sensor |
float[6] |
data |
Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() |
CategoryAPI, CategoryAPIStruct, CategoryStruct, CategoryEvents