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

# IGameInput::SetFocusPolicy

> IGameInput::SetFocusPolicy

# IGameInput::SetFocusPolicy

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

## Syntax

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

### Parameters

*policy*   \_In\_\
Type: [GameInputFocusPolicy](/reference/input/gameinput/enums/gameinputfocuspolicy)

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](/build/core-features/common/input/advanced/input-advanced-topics).

Focus policy only applies on Windows.

[Overview of GameInput](/build/core-features/common/input/overviews/input-overview)\
[GameInputFocusPolicy](/reference/input/gameinput/enums/gameinputfocuspolicy)\
[IGameInput](/reference/input/gameinput/interfaces/igameinput/igameinput)

## Version History

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


## Related topics

- [GameInputFocusPolicy](/reference/input/gameinput/enums/gameinputfocuspolicy.md)
- [IGameInput::RegisterSystemButtonCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registersystembuttoncallback.md)
- [IGameInput](/reference/input/gameinput/interfaces/igameinput/igameinput.md)
- [Porting from XInput to GameInput](/build/core-features/common/input/porting/input-porting-xinput.md)
- [SetRumbleState](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrumblestate.md)
