Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parse the interface number out of the path on Windows where possible.
Although the Windows API doesn't provide direct access to interface number, on child devices representing the interfaces of a composite device, it is parsable from the device path. An excerpt of a path for interface 1 of a Razer Hydra device is as follows: \?\hid#vid_1532&pid_0300&mi_01 See table 4 and related text here: http://msdn.microsoft.com/en-us/windows/hardware/gg487473 This patch, if a path is available, and further, if &mi_ is found, parses what it can for a hex value into the interface_number field. If there is any problem, the invalid value (-1) is used instead. Patch from Ryan Pavlik <abiryan@ryand.net> with modifications by Alan Ott.
- Loading branch information