mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
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:
@ -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
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user