diff --git a/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs b/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs
index 166662d..74ac4ec 100644
--- a/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs
+++ b/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs
@@ -227,7 +227,7 @@ namespace RGB.NET.Devices.Corsair
{
_CorsairChannelDeviceInfo channelDeviceInfo = (_CorsairChannelDeviceInfo)Marshal.PtrToStructure(channelDeviceInfoPtr, typeof(_CorsairChannelDeviceInfo));
- yield return new CorsairCustomRGBDevice(new CorsairCustomRGBDeviceInfo(info.CorsairDeviceIndex, nativeDeviceInfo, channelDeviceInfo, referenceLed, modelCounter));
+ yield return new CorsairCustomRGBDevice(new CorsairCustomRGBDeviceInfo(info, nativeDeviceInfo, channelDeviceInfo, referenceLed, modelCounter));
referenceLed += channelDeviceInfo.deviceLedCount;
channelDeviceInfoPtr = new IntPtr(channelDeviceInfoPtr.ToInt64() + channelDeviceInfoStructSize);
diff --git a/RGB.NET.Devices.Corsair/Custom/CorsairCustomRGBDeviceInfo.cs b/RGB.NET.Devices.Corsair/Custom/CorsairCustomRGBDeviceInfo.cs
index 4fa6b07..424776e 100644
--- a/RGB.NET.Devices.Corsair/Custom/CorsairCustomRGBDeviceInfo.cs
+++ b/RGB.NET.Devices.Corsair/Custom/CorsairCustomRGBDeviceInfo.cs
@@ -28,15 +28,16 @@ namespace RGB.NET.Devices.Corsair
///
/// Internal constructor of managed .
///
- /// The index of the .
+ /// The info describing the the .
/// The native -struct
/// The native representing this device.
/// The id of the first led of this device.
/// A dictionary containing counters to create unique names for equal devices models.
- internal CorsairCustomRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo, _CorsairChannelDeviceInfo channelDeviceInfo,
+ internal CorsairCustomRGBDeviceInfo(CorsairRGBDeviceInfo info, _CorsairDeviceInfo nativeInfo,
+ _CorsairChannelDeviceInfo channelDeviceInfo,
CorsairLedId referenceCorsairLed, Dictionary modelCounter)
- : base(deviceIndex, GetDeviceType(channelDeviceInfo.type), nativeInfo,
- GetModelName(channelDeviceInfo.type), modelCounter)
+ : base(info.CorsairDeviceIndex, GetDeviceType(channelDeviceInfo.type), nativeInfo,
+ GetModelName(info, channelDeviceInfo), modelCounter)
{
this.ReferenceCorsairLed = referenceCorsairLed;
@@ -72,9 +73,9 @@ namespace RGB.NET.Devices.Corsair
}
}
- private static string GetModelName(CorsairChannelDeviceType deviceType)
+ private static string GetModelName(IRGBDeviceInfo info, _CorsairChannelDeviceInfo channelDeviceInfo)
{
- switch (deviceType)
+ switch (channelDeviceInfo.type)
{
case CorsairChannelDeviceType.Invalid:
return "Invalid";
@@ -92,7 +93,19 @@ namespace RGB.NET.Devices.Corsair
return "ML Fan";
case CorsairChannelDeviceType.Strip:
- return "Led Strip";
+ // LS100 Led Strips are reported as one big strip if configured in monitor mode in iCUE, 138 LEDs for dual monitor, 84 for single
+ if ((info.Model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 138))
+ return "LS100 Led Strip (dual monitor)";
+ else if ((info.Model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 84))
+ return "LS100 Led Strip (single monitor)";
+ // Any other value means an "External LED Strip" in iCUE, these are reported per-strip, 15 for short strips, 27 for long
+ else if ((info.Model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 15))
+ return "LS100 Led Strip (short)";
+ else if ((info.Model == "LS100 Starter Kit") && (channelDeviceInfo.deviceLedCount == 27))
+ return "LS100 Led Strip (long)";
+ // Device model is "Commander Pro" for regular LED strips
+ else
+ return "Led Strip";
case CorsairChannelDeviceType.DAP:
return "DAP Fan";
@@ -101,7 +114,7 @@ namespace RGB.NET.Devices.Corsair
return "Pump";
default:
- throw new ArgumentOutOfRangeException(nameof(deviceType), deviceType, null);
+ throw new ArgumentOutOfRangeException(nameof(channelDeviceInfo.type), channelDeviceInfo.type, null);
}
}
diff --git a/RGB.NET.Devices.Wooting/Generic/WootingUpdateQueue.cs b/RGB.NET.Devices.Wooting/Generic/WootingUpdateQueue.cs
index 8342768..8f89610 100644
--- a/RGB.NET.Devices.Wooting/Generic/WootingUpdateQueue.cs
+++ b/RGB.NET.Devices.Wooting/Generic/WootingUpdateQueue.cs
@@ -36,7 +36,7 @@ namespace RGB.NET.Devices.Wooting.Generic
_WootingSDK.ArrayUpdateKeyboard();
}
-
+
#endregion
}
}
diff --git a/RGB.NET.Devices.Wooting/Native/_WootingDeviceInfo.cs b/RGB.NET.Devices.Wooting/Native/_WootingDeviceInfo.cs
index 5855a7b..d22a518 100644
--- a/RGB.NET.Devices.Wooting/Native/_WootingDeviceInfo.cs
+++ b/RGB.NET.Devices.Wooting/Native/_WootingDeviceInfo.cs
@@ -4,18 +4,18 @@ using RGB.NET.Devices.Wooting.Enum;
namespace RGB.NET.Devices.Wooting.Native
{
[StructLayout(LayoutKind.Sequential)]
- public struct _WootingDeviceInfo
+ internal struct _WootingDeviceInfo
{
- public bool Connected { get; private set; }
+ internal bool Connected { get; private set; }
- public string Model { get; private set; }
+ internal string Model { get; private set; }
- public byte MaxRows { get; private set; }
+ internal byte MaxRows { get; private set; }
- public byte MaxColumns { get; private set; }
+ internal byte MaxColumns { get; private set; }
- public byte KeycodeLimit { get; private set; }
+ internal byte KeycodeLimit { get; private set; }
- public WootingDeviceType DeviceType { get; private set; }
+ internal WootingDeviceType DeviceType { get; private set; }
}
}
diff --git a/RGB.NET.Devices.Wooting/Native/_WootingSDK.cs b/RGB.NET.Devices.Wooting/Native/_WootingSDK.cs
index b90e4f7..a9dee8e 100644
--- a/RGB.NET.Devices.Wooting/Native/_WootingSDK.cs
+++ b/RGB.NET.Devices.Wooting/Native/_WootingSDK.cs
@@ -6,13 +6,12 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
-using System.Text;
using RGB.NET.Core;
namespace RGB.NET.Devices.Wooting.Native
{
// ReSharper disable once InconsistentNaming
- public class _WootingSDK
+ internal static class _WootingSDK
{
#region Library management