Skip to main content

SDL_GetGamepadSensorDataRate

Function SDL_GetGamepadSensorDataRate 

Source
pub unsafe extern "C" fn SDL_GetGamepadSensorDataRate(
    gamepad: *mut SDL_Gamepad,
    type_: SDL_SensorType,
) -> f32
Expand description

Get the data rate (number of events per second) of a gamepad sensor.

Parameter: gamepad the gamepad to query. Parameter: type the type of sensor to query. Returns: the data rate, or 0.0f if the data rate is not available.

Thread Safety: It is safe to call this function from any thread.

Available Since: This function is available since SDL 3.2.0.