> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XInputEnable

> XInputEnable

# XInputEnable

Establece el estado de notificación de XInput.

## Sintaxis

```cpp theme={null}
void XInputEnable(  
         BOOL enable  
)  
```

### Parámetros

*enable*   \_In\_\
Tipo: BOOL

Si enable es **FALSE**, XInput solo enviará datos neutros en respuesta a [XInputGetState](/reference/input/xinputongameinput/functions/xinputgetstate): es decir, todos los botones sin presionar, los ejes centrados y los gatillos a 0. Las llamadas a [XInputSetState](/reference/input/xinputongameinput/functions/xinputsetstate) se registrarán, pero no se enviarán al dispositivo. Enviar cualquier valor distinto de **FALSE** restaurará la funcionalidad de lectura y escritura a la normalidad.

### Valor devuelto

Tipo: void

Ninguno.

## Comentarios

Esta función está en desuso y no debe incluirse en ningún código nuevo. XInputEnable agrega sobrecarga a muchas llamadas del contenedor de XInput. Puede usar `#define XINPUT_ON_GAMEINPUT_NO_XINPUTENABLE` para eliminar XInputEnable y la sobrecarga resultante. Para obtener más información, consulte [Migración de XInput a GameInput](/build/core-features/common/input/porting/input-porting-xinput#optimizingSection).

Esta función está pensada para llamarse cuando una aplicación obtiene o pierde el foco. Al usar esta función, no tendrá que cambiar el bucle de consulta de XInput de la aplicación, porque siempre se notificarán datos neutros si XInput está deshabilitado.

En un mando que admita efectos de vibración:

* Pasar **FALSE** detendrá cualquier efecto de vibración que se esté reproduciendo en ese momento. En este estado, las llamadas a [XInputSetState](/reference/input/xinputongameinput/functions/xinputsetstate) se registrarán, pero no se pasarán al dispositivo.
* Pasar **TRUE** pasará la última solicitud de vibración (aunque sea 0) enviada a [XInputSetState](/reference/input/xinputongameinput/functions/xinputsetstate) y al dispositivo.

## Requisitos

**Encabezado:** XInputOnGameInput.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** consolas de la familia XBOX One y consolas XBOX Series

## Consulte también

[Migración de XInput a GameInput](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)\
[XInputGetState](/reference/input/xinputongameinput/functions/xinputgetstate)\
[XInputSetState](/reference/input/xinputongameinput/functions/xinputsetstate)


## Related topics

- [XInputOnGameInput](/es/reference/input/xinputongameinput/xinputongameinput_members.md)
- [Portabilidad de XInput a GameInput](/es/build/core-features/common/input/porting/input-porting-xinput.md)
- [IGameInput::EnableOemDeviceSupport](/es/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_enableoemdevicesupport.md)
- [XGameStreamingIsTouchInputEnabled](/es/reference/system/xgamestreaming/functions/xgamestreamingistouchinputenabled.md)
- [Miembros de la API de GameInput en desuso](/es/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
