From 5fa190490d3c2743a66b027345c6c00eb5dc1298 Mon Sep 17 00:00:00 2001 From: joachim Date: Thu, 2 Mar 2023 14:01:52 +0100 Subject: [PATCH] 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. --- Src/OSD/SDL/SDLInputSystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Src/OSD/SDL/SDLInputSystem.cpp b/Src/OSD/SDL/SDLInputSystem.cpp index e4d4a7f..4c6c901 100644 --- a/Src/OSD/SDL/SDLInputSystem.cpp +++ b/Src/OSD/SDL/SDLInputSystem.cpp @@ -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;