InputCommon: Split Device stuff out

The ExpressionParser needs this to be out of here to prevent issues
with cyclic references.
This commit is contained in:
Jasper St. Pierre
2013-06-16 20:07:10 -04:00
parent 143d2eccb4
commit 877106b027
30 changed files with 448 additions and 451 deletions

View File

@ -1,6 +1,3 @@
#include "../ControllerInterface.h"
#ifdef CIFACE_USE_XINPUT
#include "XInput.h"
@ -51,7 +48,7 @@ static const char* const named_motors[] =
"Motor R"
};
void Init(DeviceList& devices)
void Init(std::vector<Core::Device*>& devices)
{
XINPUT_CAPABILITIES caps;
for (int i = 0; i != 4; ++i)
@ -210,5 +207,3 @@ void Device::Motor::SetState(ControlState state)
}
}
#endif

View File

@ -1,7 +1,7 @@
#ifndef _CIFACE_XINPUT_H_
#define _CIFACE_XINPUT_H_
#include "../ControllerInterface.h"
#include "../Device.h"
#define NOMINMAX
#include <Windows.h>
@ -12,12 +12,12 @@ namespace ciface
namespace XInput
{
void Init(DeviceList& devices);
void Init(std::vector<Core::Device*>& devices);
class Device : public ControllerInterface::Device
class Device : public Core::Device
{
private:
class Button : public Input
class Button : public Core::Device::Input
{
public:
std::string GetName() const;
@ -28,7 +28,7 @@ private:
u8 m_index;
};
class Axis : public Input
class Axis : public Core::Device::Input
{
public:
std::string GetName() const;
@ -40,7 +40,7 @@ private:
const u8 m_index;
};
class Trigger : public Input
class Trigger : public Core::Device::Input
{
public:
std::string GetName() const;
@ -52,7 +52,7 @@ private:
const u8 m_index;
};
class Motor : public Output
class Motor : public Core::Device::Output
{
public:
std::string GetName() const;