Kinc to Kore

This commit is contained in:
Gorochu
2026-06-09 13:00:08 -07:00
parent 7558d03739
commit c24828f11d
895 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,28 @@
#pragma once
#include <kinc/global.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/hid/IOHIDKeys.h>
#include <IOKit/hid/IOHIDManager.h>
#include "HIDGamepad.h"
// Maximum number of devices supported
// Corresponds to size of Kore::Gamepad array
static const int KINC_MAX_HID_DEVICES = 12;
// Slots to hold details on connected devices
struct HIDManagerDeviceRecord {
bool connected; // = false;
IOHIDDeviceRef device; // = NULL;
struct HIDGamepad pad;
};
struct HIDManager {
IOHIDManagerRef managerRef;
struct HIDManagerDeviceRecord devices[KINC_MAX_HID_DEVICES];
};
void HIDManager_init(struct HIDManager *manager);
void HIDManager_destroy(struct HIDManager *manager);