mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 09:35:39 +00:00
Add a setting to allow for joystick input to work while not in focus.
This commit is contained in:
parent
08c2c561ca
commit
33d6733d64
|
@ -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);
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ void Settings::setDefaults()
|
|||
mBoolMap.clear();
|
||||
mIntMap.clear();
|
||||
|
||||
mBoolMap["BackgroundJoystickInput"] = false;
|
||||
mBoolMap["ParseGamelistOnly"] = false;
|
||||
mBoolMap["DrawFramerate"] = false;
|
||||
mBoolMap["ShowExit"] = true;
|
||||
|
|
Loading…
Reference in a new issue