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

# IGameInput::SetFocusPolicy (Deprecated)

> Sets the focus policy for a game's input devices (removed in v4).

> [!WARNING]
>
> **Deprecated.** This method was removed in GameInput v4 and is not available in the current API. Use [IGameInput::EnableBackgroundInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_enablebackgroundinput.md) instead.

Sets the focus policy for a game's input devices.

## Syntax

```cpp theme={null}
void SetFocusPolicy(
    GameInputFocusPolicy policy
);
```

### Parameters

*policy*   \_In\_\
Type: [GameInputFocusPolicy](https://docs.xbox.com/reference/input/gameinput/deprecated/enums/gameinputfocuspolicy.md)

The focus policy to be set.

### Return value

Type: void

No return.

## Remarks

The `IGameInput::SetFocusPolicy` method sets the focus policy for a game's input devices. The focus policy determines whether the input devices provide input based on the focus of the game. Focus refers to whether the game is selected as the main focus or if it is currently running in the background while another application has focus. For intermediate and advanced use-cases of the GameInput API, see [Advanced GameInput topics](https://docs.xbox.com/build/core-features/common/input/advanced/input-advanced-topics.md).

Focus policy only applies on Windows.

On PC, when the GameInput runtime is sideloaded with the application rather than installed on the system, only `GameInputDefaultFocusPolicy` and `GameInputEnableBackgroundInput` are accepted. Other values, including any combination of flags, are ignored. For more information, see [GameInput sideloading](https://docs.xbox.com/build/core-features/common/input/overviews/input-agility-redistributable.md).

## See also

[Deprecated GameInput API members](https://docs.xbox.com/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)\
[IGameInput::EnableBackgroundInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_enablebackgroundinput.md)\
[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[GameInputFocusPolicy](https://docs.xbox.com/reference/input/gameinput/deprecated/enums/gameinputfocuspolicy.md)\
[IGameInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/igameinput.md)

## Version History

| Version | Changes |
| - | - |
| **v4** | Removed. |
| **v0** | Introduced. |


## Related topics

- [IGameInput::EnableBackgroundInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_enablebackgroundinput.md)
- [IGameInput::SetFocusPolicy](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_setfocuspolicy.md)
- [GameInputFocusPolicy (Deprecated)](https://docs.xbox.com/reference/input/gameinput/deprecated/enums/gameinputfocuspolicy.md)
- [RegisterSystemButtonCallback (Deprecated)](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_registersystembuttoncallback.md)
- [Deprecated GameInput API members](https://docs.xbox.com/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
