Skip to content

FiniteTrigger

The FiniteTrigger struct stores data about a controller’s triggers.

typedef struct {
uint16_t axis;
double value;
} FiniteTrigger;
TypeDescription
uint16_t axisThe linux evdev code of the trigger.
double valueThe “pressure” value of the triggers.

Developers in general are discourageed from trying to read data from a gamepad directly as they are a “voliatile type” Controllers can be disconnected at any time for any reason and as such this struct may not always exist when trying to read it even after verifying its existance (TOCTOU).