From f638aa816ff7a6de198a32f0e0a71a77656ea6c6 Mon Sep 17 00:00:00 2001 From: Paliverse <4289084+Paliverse@users.noreply.github.com> Date: Thu, 3 Jul 2025 04:02:22 -0500 Subject: [PATCH] Changed reportSize to maxInputReportSize, and added maxOutputReportSize --- Sources/HIDDevice.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Sources/HIDDevice.swift b/Sources/HIDDevice.swift index 525e046..ff5c12a 100644 --- a/Sources/HIDDevice.swift +++ b/Sources/HIDDevice.swift @@ -40,8 +40,11 @@ public struct HIDDevice: Hashable, Identifiable { /// The underlying HID device. public let device: IOHIDDevice - /// The report size. - public let reportSize: Int + /// The input report size. + public let maxInputReportSize: Int + + /// The output report size. + public let maxOutputReportSize:Int /// The location ID of the device public let id: Int32 @@ -71,7 +74,8 @@ public struct HIDDevice: Hashable, Identifiable { self.name = IOHIDDeviceGetProperty(device, kIOHIDProductKey as CFString) as? String ?? "" self.vendorId = IOHIDDeviceGetProperty(self.device, kIOHIDVendorIDKey as CFString) as? Int16 ?? 0 self.productId = IOHIDDeviceGetProperty(self.device, kIOHIDProductIDKey as CFString) as? Int16 ?? 0 - self.reportSize = IOHIDDeviceGetProperty(self.device, kIOHIDMaxInputReportSizeKey as CFString) as? Int ?? 0 + self.maxInputReportSize = IOHIDDeviceGetProperty(self.device, kIOHIDMaxInputReportSizeKey as CFString) as? Int ?? 0 + self.maxOutputReportSize = IOHIDDeviceGetProperty(self.device, kIOHIDMaxOutputReportSizeKey as CFString) as? Int ?? 0 self.manufacturer = IOHIDDeviceGetProperty(self.device, kIOHIDManufacturerKey as CFString) as? String ?? "" self.serialNumber = IOHIDDeviceGetProperty(self.device, kIOHIDSerialNumberKey as CFString) as? String ?? ""