microsoft / GDK

Microsoft Public GDK
http://aka.ms/gamedevdocs
Other
1.48k stars 99 forks source link

IGameInput::SetFocusPolicy has no effect #30

Open nice-sprite opened 1 year ago

nice-sprite commented 1 year ago
HRESULT result = GameInputCreate(game_input.GetAddressOf());
game_input->SetFocusPolicy(GameInputDisableBackgroundInput);

The above code results in input still being reported through

game_input->GetCurrentReading(GameInputKindGamepad, gamepad.Get(), &reading))

This is not the expected behavior. The documentation states that GameInput should receive "at-rest" values when background input is disabled here, but it does not respect the current FocusPolicy.

Related issue with the SetFocusPolicy documentation: #26

System info:

OS Name: Microsoft Windows 10 Pro Version 10.0.19044 Build 19044 Hardware Abstraction Layer Version = "10.0.19041.1806" GDK June 2022 Update 2