SDL 3.0
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 702 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 709 of file SDL_events.h.

◆ reserved

Uint32 SDL_GamepadSensorEvent::reserved

Definition at line 705 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 708 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 710 of file SDL_events.h.

◆ timestamp

Uint64 SDL_GamepadSensorEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 706 of file SDL_events.h.

◆ type

SDL_EventType SDL_GamepadSensorEvent::type

SDL_EVENT_GAMEPAD_SENSOR_UPDATE

Definition at line 704 of file SDL_events.h.

◆ which

SDL_JoystickID SDL_GamepadSensorEvent::which

The joystick instance id

Definition at line 707 of file SDL_events.h.


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