---
name: "SDL_SetGamepadSensorEnabled"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_SetGamepadSensorEnabled"
---

# SDL\_SetGamepadSensorEnabled(3)

Set whether data reporting for a gamepad sensor is enabled.

## NAME

SDL\_SetGamepadSensorEnabled - Set whether data reporting for a gamepad sensor is enabled.

## HEADER FILE

Defined in SDL3/SDL\_gamepad.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_SetGamepadSensorEnabled(SDL\_Gamepad \*gamepad, SDL\_SensorType type, bool enabled);**

## FUNCTION PARAMETERS

- *gamepad*

  the gamepad to update.

- *type*

  the type of sensor to enable/disable.

- *enabled*

  whether data reporting should be enabled.

## RETURN VALUE

Returns true on success or false on failure; call

**SDL\_GetError** () for more information.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GamepadHasSensor**(3)](/SDL_GamepadHasSensor/3.md), **•**(3), [**SDL\_GamepadSensorEnabled**(3)](/SDL_GamepadSensorEnabled/3.md)
