Skip to content

Commit bba6555

Browse files
committed
Enable background input when using Microsoft GameInput
1 parent 483b8d4 commit bba6555

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/joystick/gdk/SDL_gameinputjoystick.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ static bool GAMEINPUT_JoystickInit(void)
279279
return false;
280280
}
281281

282+
// Allow background controller input
283+
// SDL manages focus policy at a higher level, so we can set this unconditionally.
284+
g_pGameInput->SetFocusPolicy(GameInputEnableBackgroundInput | GameInputEnableBackgroundGuideButton | GameInputEnableBackgroundShareButton);
285+
282286
hr = g_pGameInput->RegisterDeviceCallback(NULL,
283287
GameInputKindController,
284288
GameInputDeviceConnected,

0 commit comments

Comments
 (0)