mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
Fixed crash in logitech device provider, when multiple lightspeed devices with the same usage are connected
This commit is contained in:
parent
5c864a03e5
commit
f2491038a3
@ -104,7 +104,9 @@ public sealed class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefi
|
||||
Dictionary<byte, HidDevice> deviceUsages = DeviceList.Local
|
||||
.GetHidDevices(VendorId, pid)
|
||||
.Where(d => d.DevicePath.Contains("mi_02"))
|
||||
.ToDictionary(x => (byte)x.GetUsage(), x => x);
|
||||
.Select(x => ((byte)x.GetUsage(), x))
|
||||
.DistinctBy(x => x.Item1)
|
||||
.ToDictionary(x => x.Item1, x => x.x);
|
||||
|
||||
foreach ((int wirelessPid, byte _) in GetWirelessDevices(deviceUsages))
|
||||
yield return wirelessPid;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user