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