Enable background input when using Microsoft GameInput

This commit is contained in:
Sam Lantinga
2025-08-04 10:21:58 -07:00
parent 483b8d4d98
commit bba6555bf1

View File

@@ -279,6 +279,10 @@ static bool GAMEINPUT_JoystickInit(void)
return false;
}
// Allow background controller input
// SDL manages focus policy at a higher level, so we can set this unconditionally.
g_pGameInput->SetFocusPolicy(GameInputEnableBackgroundInput | GameInputEnableBackgroundGuideButton | GameInputEnableBackgroundShareButton);
hr = g_pGameInput->RegisterDeviceCallback(NULL,
GameInputKindController,
GameInputDeviceConnected,