summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/SDL
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SDL')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp6
-rw-r--r--Source/Core/InputCommon/ControllerInterface/SDL/SDL.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
index 8f8265e8d0..7da8e66fc6 100644
--- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
@@ -47,6 +47,12 @@ void Init()
// Failed to initialize
return;
}
+}
+
+void PopulateDevices()
+{
+ if (!(SDL_WasInit(SDL_INIT_EVERYTHING) & SDL_INIT_JOYSTICK))
+ return;
// joysticks
for (int i = 0; i < SDL_NumJoysticks(); ++i)
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
index e104af7715..c41bb57614 100644
--- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
+++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
@@ -21,6 +21,7 @@ namespace ciface
namespace SDL
{
void Init();
+void PopulateDevices();
class Joystick : public Core::Device
{