Function SDL_GamepadHasSensor

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

Return whether a gamepad has a particular sensor.

§Parameters

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

§Return value

Returns true if the sensor exists, false otherwise.

§Availability

This function is available since SDL 3.2.0.

§See also