1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 01:58:30 +00:00

Fixed novation devices not always beeing detected correctly

This commit is contained in:
Darth Affe 2022-04-15 16:42:59 +02:00
parent aa67a606a5
commit d484030821

View File

@ -54,7 +54,11 @@ public class NovationDeviceProvider : AbstractRGBDeviceProvider
NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices))
.Cast<Enum>()
.FirstOrDefault(x => x.GetDeviceId()?.ToUpperInvariant().Contains(outCaps.name.ToUpperInvariant()) ?? false);
.FirstOrDefault(x =>
{
string? deviceId = x.GetDeviceId();
return (deviceId != null) && outCaps.name.ToUpperInvariant().Contains(deviceId.ToUpperInvariant());
});
if (deviceId == null) continue;