Function SDL_GetGamepadSensorDataRate

pub unsafe extern "C" fn SDL_GetGamepadSensorDataRate(
    gamepad: *mut SDL_Gamepad,
    type: SDL_SensorType,
) -> f32
Available on crate feature dep_sdl3 only.
Expand description

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

§Parameters

  • gamepad: the gamepad to query.
  • type: the type of sensor to query.

§Return value

Returns the data rate, or 0.0f if the data rate is not available.

§Availability

This function is available since SDL 3.2.0.