fix: use class matching and double-pointer refs
IOServiceMatching on idVendor/idProduct numbers is unreliable (single-key matches fail), so match the IOUSBDevice class and filter VID/PID in user space via the idVendor/idProduct properties. QI'd interfaces are double-pointer references: *ref is the interface struct and methods are called as (*ref)->Method(ref, ...). The old code treated the slot as the struct and crashed on the first method call. Verified on a physical dongle (PID 0x02E6): probe opens the device, enumerates EP 0x04 IN/OUT and EP 0x05 IN, and register reads via DeviceRequest return valid values (MT7612 ASIC version). Co-Authored-By: qwen3.8-27b@q2_k_xl: fixed USB transport for hardware
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ if(NOT CMAKE_GENERATOR MATCHES "^(Ninja|Xcode)$")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
project(xone_macos VERSION 0.1.3 LANGUAGES CXX Swift)
|
||||
project(xone_macos VERSION 0.1.4 LANGUAGES CXX Swift)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user