finite_gamepad_init
The finite_gamepad_init function creates a FiniteGamepad
bool finite_gamepad_init(FiniteShell *shell)Properties
Section titled “Properties”| Type | Description |
|---|---|
FiniteShell *shell | The FiniteShell the gamepad is connected to. |
Code Example
Section titled “Code Example”bool withGP = finite_gamepad_init(myShell);myShell->canHomeMenu = false;
if (!withGP) { FINITE_LOG_ERROR("Can't poll controller data");}Specification
Section titled “Specification”finite_gamepad_init returns false only if the program is unable to search for gamepads. If no gamepads are connected, FiniteShell.gamepadAvailable will be false. Developers should verify a controller is available before doing anything controller intensive.