Syntax
Parameters
enable   _In_Type: bool
true to receive input while the application doesn’t have focus; false to receive input only while the application has focus.
Return value
Type: void This method doesn’t return a value.Remarks
By default, GameInput delivers input to an application only while it’s in the foreground and has focus. CallEnableBackgroundInput(true) to also receive input while another application has focus. Background input applies to all input kinds at once, including the Guide and Share system buttons that are reported through IGameInputReading::GetSystemButtonState. Call EnableBackgroundInput(false) to return to the default behavior.
This setting is primarily relevant on Windows, where several applications can run side by side and the focus can move between them.
This method replaces the IGameInput::SetFocusPolicy method and the GameInputFocusPolicy enumeration from earlier versions of GameInput. The exclusive foreground policies, which prevented other processes from receiving input, aren’t available in GameInput v4.
On PC, when the GameInput runtime is sideloaded with the application, rather than installed on the system, enabling background input is ignored. For more information, see GameInput sideloading.
Many users run overlay applications that use the Guide button for menus and the Share button for screenshots. Consider whether your application needs to process system buttons while it’s in the background.
Requirements
Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
Overview of GameInputGameInput fundamentals
GameInput sideloading
IGameInput
IGameInput::SetFocusPolicy (Deprecated)
