SDL_ControllerSensorEvent Struct Reference

`#include <SDL_events.h>`

## Data Fields

Uint32 | type
Uint32 | timestamp
SDL_JoystickID | which
Sint32 | sensor
float | data [3]
Uint64 | timestamp_us

## Detailed Description

Game controller sensor event structure (event.csensor.*)

Definition at line 505 of file SDL_events.h.

## Field Documentation

## data

float SDL_ControllerSensorEvent::data[3]

Up to 3 values from the sensor, as defined in SDL_sensor.h

Definition at line 511 of file SDL_events.h.

## sensor

Sint32 SDL_ControllerSensorEvent::sensor

The type of the sensor, one of the values of SDL_SensorType

Definition at line 510 of file SDL_events.h.

## timestamp

Uint32 SDL_ControllerSensorEvent::timestamp

In milliseconds, populated using SDL_GetTicks()

Definition at line 508 of file SDL_events.h.

## timestamp_us

Uint64 SDL_ControllerSensorEvent::timestamp_us

The timestamp of the sensor reading in microseconds, if the hardware provides this information.

Definition at line 512 of file SDL_events.h.

## type

Uint32 SDL_ControllerSensorEvent::type

SDL_CONTROLLERSENSORUPDATE

Definition at line 507 of file SDL_events.h.

## which

SDL_JoystickID SDL_ControllerSensorEvent::which

The joystick instance id

Definition at line 509 of file SDL_events.h.

The documentation for this struct was generated from the following file:

- SDL_events.h