SDL_GamepadSensorEvent Struct Reference

`#include <SDL_events.h>`

## Data Fields

SDL_EventType | type
Uint32 | reserved
Uint64 | timestamp
SDL_JoystickID | which
Sint32 | sensor
float | data [3]
Uint64 | sensor_timestamp

## Detailed Description

Gamepad sensor event structure (event.gsensor.*)

Since
  This struct is available since SDL 3.2.0.

Definition at line 693 of file SDL_events.h.

## Field Documentation

## data

float SDL_GamepadSensorEvent::data[3]

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

Definition at line 700 of file SDL_events.h.

## reserved

Uint32 SDL_GamepadSensorEvent::reserved

Definition at line 696 of file SDL_events.h.

## sensor

Sint32 SDL_GamepadSensorEvent::sensor

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

Definition at line 699 of file SDL_events.h.

## sensor_timestamp

Uint64 SDL_GamepadSensorEvent::sensor_timestamp

The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock

Definition at line 701 of file SDL_events.h.

## timestamp

Uint64 SDL_GamepadSensorEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 697 of file SDL_events.h.

## type

SDL_EventType SDL_GamepadSensorEvent::type

SDL_EVENT_GAMEPAD_SENSOR_UPDATE

Definition at line 695 of file SDL_events.h.

## which

SDL_JoystickID SDL_GamepadSensorEvent::which

The joystick instance id

Definition at line 698 of file SDL_events.h.

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

- SDL_events.h