11#ifndef INCGUARD_MGL_GAMEPAD_DELEGATE_IOKIT_HID_H_1610181163
12#define INCGUARD_MGL_GAMEPAD_DELEGATE_IOKIT_HID_H_1610181163
15#if defined(MGL_GAMEPAD_DELEGATE_ENABLE_IOKIT_HID)
19#include <IOKit/hid/IOHIDManager.h>
29class IOKitHIDGamepadDelegate :
public GamepadDelegate
32 IOKitHIDGamepadDelegate(GamepadServer &server)
noexcept;
33 ~IOKitHIDGamepadDelegate() noexcept;
35 bool Initialize() noexcept override;
36 void UpdateState() noexcept override;
42 STL::unique_ptr<IOKitHID::GamepadDriver> driver;
43 IOHIDDeviceRef device;
52 static void CallbackDeviceMatching(
void *inContext, IOReturn inResult,
void *inSender, IOHIDDeviceRef inIOHIDDeviceRef)
noexcept;
53 static void CallbackDeviceRemoval(
void *inContext, IOReturn inResult,
void *inSender, IOHIDDeviceRef inIOHIDDeviceRef)
noexcept;
55 bool AddDevice(IOHIDDeviceRef device)
noexcept;
56 void RemoveDevice(IOHIDDeviceRef device)
noexcept;
58 bool GetDevicePropertyValue(int32_t &value,
const IOHIDDeviceRef device,
const CFStringRef key)
const noexcept;
59 bool GetDevicePropertyString(STL::string &
string,
const IOHIDDeviceRef device,
const CFStringRef key)
const noexcept;
61 IOHIDManagerRef _hidManager;
64 STL::list<STL::unique_ptr<IOKitHIDState>> _hidStateList;
PadPriority
パッドのプライオリティ
Definition mgl_gamepad_defs.h:192