> ## 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.

# XInputOnGameInputInitialize

> XInputOnGameInputInitialize

# XInputOnGameInputInitialize

Initialize the XInput wrapper API.

## Syntax

```cpp theme={null}
HRESULT XInputOnGameInputInitialize(  
)  
```

### Parameters

### Return value

Type: HRESULT

Function's result.

## Remarks

To use this function, you must define the `XINPUT_ON_GAMEINPUT_EXPLICIT_INITIALIZATION` macro. By default, XInput is initialized in the background, and this causes the first call to an XInput function to take significantly more time, because it's bundled with the initialization work. `XINPUT_ON_GAMEINPUT_EXPLICIT_INITIALIZATION` gives you finer control over the initialization and uninitialization of XInput. To learn more and see the benefits of explicit initialization, read [Porting from XInput to GameInput](/build/core-features/common/input/porting/input-porting-xinput#optimizingSection).

## Requirements

**Header:** XInputOnGameInput.h

**Library:** xgameruntime.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[Port XInput to GameInput](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)\
[XInputOnGameInputUninitialize](/reference/input/xinputongameinput/functions/xinputongameinputuninitialize)


## Related topics

- [XInputOnGameInputUninitialize](/reference/input/xinputongameinput/functions/xinputongameinputuninitialize.md)
- [XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members.md)
- [Porting from XInput to GameInput](/build/core-features/common/input/porting/input-porting-xinput.md)
- [Force feedback on GameInput](/build/core-features/common/input/advanced/input-forcefeedback.md)
- [XGameStreamingIsTouchInputEnabled](/reference/system/xgamestreaming/functions/xgamestreamingistouchinputenabled.md)
