Function fermium::gamecontroller::SDL_GameControllerGetSensorData [−][src]
pub unsafe extern "C" fn SDL_GameControllerGetSensorData(
gamecontroller: *mut SDL_GameController,
type_: SDL_SensorType,
data: *mut c_float,
num_values: c_int
) -> c_int
Get the current state of a game controller sensor.
The number of values and interpretation of the data is sensor dependent.
See sensor
for the details for each type of sensor.
gamecontroller
The controller to querytype
The type of sensor to querydata
A pointer filled with the current sensor statenum_values
The number of values to write to data
Returns: 0, or -1 if an error occurred.