summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/SDL
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-06-16 20:07:10 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2013-06-25 00:58:30 -0400
commit877106b027431c6edb2d2c702fa6d811dac3d250 (patch)
treea0d83be190efea7ad4915db7db9ac40f9192b251 /Source/Core/InputCommon/Src/ControllerInterface/SDL
parent143d2eccb49b700ccd00dfa229b03d1d1a51533c (diff)
InputCommon: Split Device stuff out
The ExpressionParser needs this to be out of here to prevent issues with cyclic references.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/SDL')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp11
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h10
2 files changed, 10 insertions, 11 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
index 6c74c55d97..006b82d4ac 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
@@ -1,10 +1,11 @@
-#include "../ControllerInterface.h"
-
-#ifdef CIFACE_USE_SDL
#include "SDL.h"
#include <StringUtil.h>
+#include <map>
+#include <sstream>
+#include <algorithm>
+
#ifdef _WIN32
#if SDL_VERSION_ATLEAST(1, 3, 0)
#pragma comment(lib, "SDL.1.3.lib")
@@ -27,7 +28,7 @@ std::string GetJoystickName(int index)
#endif
}
-void Init( std::vector<ControllerInterface::Device*>& devices )
+void Init( std::vector<Core::Device*>& devices )
{
// this is used to number the joysticks
// multiple joysticks with the same name shall get unique ids starting at 0
@@ -399,5 +400,3 @@ ControlState Joystick::Hat::GetState() const
}
}
-
-#endif
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h
index fa770c403d..6a65efeedb 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h
+++ b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h
@@ -1,7 +1,7 @@
#ifndef _CIFACE_SDL_H_
#define _CIFACE_SDL_H_
-#include "../ControllerInterface.h"
+#include "../Device.h"
#include <list>
@@ -23,9 +23,9 @@ namespace ciface
namespace SDL
{
-void Init( std::vector<ControllerInterface::Device*>& devices );
+void Init( std::vector<Core::Device*>& devices );
-class Joystick : public ControllerInterface::Device
+class Joystick : public Core::Device
{
private:
@@ -40,7 +40,7 @@ private:
};
#endif
- class Button : public Input
+ class Button : public Core::Device::Input
{
public:
std::string GetName() const;
@@ -51,7 +51,7 @@ private:
const u8 m_index;
};
- class Axis : public Input
+ class Axis : public Core::Device::Input
{
public:
std::string GetName() const;