1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 10:08:31 +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")]
[ColorCapability(NovationColorCapabilities.RGB)]
[LedIdMapping(LedIdMappings.Pro)]
LaunchpadCustomFirmware,
[DeviceId("LPMiniMK3")]
[ColorCapability(NovationColorCapabilities.RGB)]
[LedIdMapping(LedIdMappings.Current)]
LaunchpadMiniMK3,
LaunchpadCustomFirmware
}

View File

@ -65,10 +65,11 @@ public sealed class NovationDeviceProvider : AbstractRGBDeviceProvider
MidiOutCaps outCaps = OutputDeviceBase.GetDeviceCapabilities(index);
if (outCaps.name == null) continue;
string deviceName = outCaps.name.ToUpperInvariant();
NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices))
.Cast<Enum>()
.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;