1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2026-01-01 02:03:38 +00:00

Compare commits

..

No commits in common. "af43c0ae8734aa28f05777ba821d3d7364bb7954" and "79f71bab29f303f2bae5f53025a2ff79c1b619df" have entirely different histories.

2 changed files with 3 additions and 7 deletions

View File

@ -34,10 +34,5 @@ public enum NovationDevices
[DeviceId("Launchpad Open")] [DeviceId("Launchpad Open")]
[ColorCapability(NovationColorCapabilities.RGB)] [ColorCapability(NovationColorCapabilities.RGB)]
[LedIdMapping(LedIdMappings.Pro)] [LedIdMapping(LedIdMappings.Pro)]
LaunchpadCustomFirmware, LaunchpadCustomFirmware
[DeviceId("LPMiniMK3")]
[ColorCapability(NovationColorCapabilities.RGB)]
[LedIdMapping(LedIdMappings.Current)]
LaunchpadMiniMK3,
} }

View File

@ -65,10 +65,11 @@ public sealed class NovationDeviceProvider : AbstractRGBDeviceProvider
MidiOutCaps outCaps = OutputDeviceBase.GetDeviceCapabilities(index); MidiOutCaps outCaps = OutputDeviceBase.GetDeviceCapabilities(index);
if (outCaps.name == null) continue; if (outCaps.name == null) continue;
string deviceName = outCaps.name.ToUpperInvariant();
NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices)) NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices))
.Cast<Enum>() .Cast<Enum>()
.Where(x => x.GetDeviceId() != null) .Where(x => x.GetDeviceId() != null)
.FirstOrDefault(x => outCaps.name.Contains(x.GetDeviceId()!, StringComparison.InvariantCultureIgnoreCase)); .FirstOrDefault(x => deviceName.Contains(x.GetDeviceId()!.ToUpperInvariant()));
if (deviceId == null) continue; if (deviceId == null) continue;