diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-06-16 20:07:10 -0400 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-06-25 00:58:30 -0400 |
| commit | 877106b027431c6edb2d2c702fa6d811dac3d250 (patch) | |
| tree | a0d83be190efea7ad4915db7db9ac40f9192b251 /Source/Core/InputCommon/Src/ControllerInterface/OSX | |
| parent | 143d2eccb49b700ccd00dfa229b03d1d1a51533c (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/OSX')
6 files changed, 15 insertions, 12 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSX.h b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSX.h index 225906c35d..a922e3f2dd 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSX.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSX.h @@ -1,13 +1,13 @@ #pragma once -#include "../ControllerInterface.h" +#include "../Device.h" namespace ciface { namespace OSX { -void Init(std::vector<ControllerInterface::Device*>& devices, void *window); +void Init(std::vector<Core::Device*>& devices, void *window); void DeInit(); void DeviceElementDebugPrint(const void *, void *); diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSX.mm b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSX.mm index aef8f283c1..8a859f46c8 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSX.mm +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSX.mm @@ -2,11 +2,12 @@ #include <IOKit/hid/IOHIDLib.h> #include <Cocoa/Cocoa.h> -#include "../ControllerInterface.h" #include "OSX.h" #include "OSXKeyboard.h" #include "OSXJoystick.h" +#include <map> + namespace ciface { namespace OSX @@ -145,8 +146,8 @@ static void DeviceMatching_callback(void* inContext, DeviceDebugPrint(inIOHIDDeviceRef); - std::vector<ControllerInterface::Device*> *devices = - (std::vector<ControllerInterface::Device*> *)inContext; + std::vector<Core::Device*> *devices = + (std::vector<Core::Device*> *)inContext; // Add to the devices vector if it's of a type we want if (IOHIDDeviceConformsTo(inIOHIDDeviceRef, @@ -164,7 +165,7 @@ static void DeviceMatching_callback(void* inContext, name, joy_name_counts[name]++)); } -void Init(std::vector<ControllerInterface::Device*>& devices, void *window) +void Init(std::vector<Core::Device*>& devices, void *window) { HIDManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone); diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.h b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.h index ecc443ad3a..ebe908522b 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.h @@ -1,13 +1,13 @@ #include <IOKit/hid/IOHIDLib.h> -#include "../ControllerInterface.h" +#include "../Device.h" namespace ciface { namespace OSX { -class Joystick : public ControllerInterface::Device +class Joystick : public Core::Device { private: class Button : public Input diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm index 0d89c2e393..ebd713d142 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm @@ -1,9 +1,10 @@ #include <Foundation/Foundation.h> #include <IOKit/hid/IOHIDLib.h> -#include "../ControllerInterface.h" #include "OSXJoystick.h" +#include <sstream> + namespace ciface { namespace OSX diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h index d59651c98a..930f849a17 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h @@ -1,13 +1,13 @@ #include <IOKit/hid/IOHIDLib.h> -#include "../ControllerInterface.h" +#include "../Device.h" namespace ciface { namespace OSX { -class Keyboard : public ControllerInterface::Device +class Keyboard : public Core::Device { private: class Key : public Input diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm index c22e267044..003240d4a9 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm @@ -3,9 +3,10 @@ #include <Cocoa/Cocoa.h> #include <wx/wx.h> // wxWidgets -#include "../ControllerInterface.h" #include "OSXKeyboard.h" +#include <sstream> + namespace ciface { namespace OSX |
