mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -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,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 *);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user