mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Merge pull request #365 from DarthAffe/Devices/Novation
Added Novation Launchpad Mini MK3
This commit is contained in:
2 files changed
+7
-3
No files matched your search
@@ -34,5 +34,10 @@ public enum NovationDevices
|
||||
[DeviceId("Launchpad Open")]
|
||||
[ColorCapability(NovationColorCapabilities.RGB)]
|
||||
[LedIdMapping(LedIdMappings.Pro)]
|
||||
LaunchpadCustomFirmware
|
||||
LaunchpadCustomFirmware,
|
||||
|
||||
[DeviceId("LPMiniMK3")]
|
||||
[ColorCapability(NovationColorCapabilities.RGB)]
|
||||
[LedIdMapping(LedIdMappings.Current)]
|
||||
LaunchpadMiniMK3,
|
||||
}
|
||||
@@ -65,11 +65,10 @@ 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 => deviceName.Contains(x.GetDeviceId()!.ToUpperInvariant()));
|
||||
.FirstOrDefault(x => outCaps.name.Contains(x.GetDeviceId()!, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
if (deviceId == null) continue;
|
||||
|
||||
|
||||
Reference in new issue
Block a user