read-controller ( controller -- controller-state )
Game controller input

Prev:calibrate-controller ( controller -- )
Next:read-keyboard ( -- keyboard-state )


Vocabulary
game.input

Inputs
controllera controller


Outputs
controller-statea controller-state


Word description
Reads the current state of controller. See the documentation for the controller-state class for details of the returned value's format. If the device is no longer available, f is returned.

Warning
For efficiency, the implementation may reuse the returned controller-state object next time read-controller is called on the same controller. You should clone any values from the returned tuple you need to preserve.


See also
controller-state, controller

Definition

HOOK: read-controller game-input-backend
( controller -- controller-state )


Methods