Allow joystick to be fetch if windows has no focus in SDL input mode.

This is usefull for multiple instance of supermodel networked on the same machine.
This commit is contained in:
joachim 2023-03-02 14:01:52 +01:00 committed by trzy
parent f7dcc1c445
commit 5fa190490d

View file

@ -192,6 +192,11 @@ void CSDLInputSystem::OpenJoysticks()
int numHapticAxes = 0;
int possibleEffect = 0;
//allow joystick to be fetch if windows has no focus.
//this is usefull for multiple instance networked on the same machine
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
for (int joyNum = 0; joyNum < numJoys; joyNum++)
{
numHapticAxes = 0;