diff --git a/es-core/src/InputManager.cpp b/es-core/src/InputManager.cpp index 5795f762d..9437b7a4f 100644 --- a/es-core/src/InputManager.cpp +++ b/es-core/src/InputManager.cpp @@ -1,5 +1,6 @@ #include "InputManager.h" #include "InputConfig.h" +#include "Settings.h" #include "Window.h" #include "Log.h" #include "pugixml/pugixml.hpp" @@ -45,6 +46,9 @@ void InputManager::init() if(initialized()) deinit(); + if (Settings::getInstance()->getBool("BackgroundJoystickInput")){ + SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); + } SDL_InitSubSystem(SDL_INIT_JOYSTICK); SDL_JoystickEventState(SDL_ENABLE); diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index 60352d949..779ee7142 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -39,6 +39,7 @@ void Settings::setDefaults() mBoolMap.clear(); mIntMap.clear(); + mBoolMap["BackgroundJoystickInput"] = false; mBoolMap["ParseGamelistOnly"] = false; mBoolMap["DrawFramerate"] = false; mBoolMap["ShowExit"] = true;