Skip to main content

SDL_SetGamepadSensorEnabled

Function SDL_SetGamepadSensorEnabled 

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

Set whether data reporting for a gamepad sensor is enabled.

Parameter: gamepad the gamepad to update. Parameter: type the type of sensor to enable/disable. Parameter: enabled whether data reporting should be enabled. Returns: true on success or false on failure; call SDL_GetError() for more information.

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

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_GamepadHasSensor See Also: SDL_GamepadSensorEnabled