SDL_SensorEvent - Sensor event structure (event.sensor.*)
Contents
Availability
This struct is available since SDL 3.2.0.
Simple Directmedia Layer SDL 3.2.20 SDL_SensorEvent(3type)
Name
SDL_SensorEvent - Sensor event structure (event.sensor.*)
Synopsis
#include<SDL3/SDL_events.h>typedefstructSDL_SensorEvent{SDL_EventTypetype;/**<SDL_EVENT_SENSOR_UPDATE*/Uint32reserved;Uint64timestamp;/**<Innanoseconds,populatedusingSDL_GetTicksNS()*/SDL_SensorIDwhich;/**<TheinstanceIDofthesensor*/floatdata[6];/**<Upto6valuesfromthesensor-additionalvaluescanbequeriedusingSDL_GetSensorData()*/Uint64sensor_timestamp;/**<Thetimestampofthesensorreadinginnanoseconds,notnecessarilysynchronizedwiththesystemclock*/}SDL_SensorEvent;