FiniteDpad
The FiniteDpad struct stores data about a controller’s dpad.
typedef struct { uint16_t xAxis; int xValue; uint16_t yAxis; int yValue;} FiniteDpad;Properties
Section titled “Properties”| Type | Description |
|---|---|
uint16_t xAxis | The linux evdev code of the joystick’s. |
double xValue | The “range” of the input value from -1 to +1. Negatives are Left & Up while positives are Right and Down. |
uint16_t yAxis | The linux evdev code of the joystick’s Y Axis. |
double yValue | The “range” of the input value from -1 to +1. Negatives are Left & Up while positives are Right and Down. |
Specification
Section titled “Specification”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).