mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 13:06:24 +00:00
Update the corsair device-provider to make use of the new features in the 3.0.217 SDK
This commit is contained in:
1 parent
fce3dfaeb9
commit
586d20936e
3 files changed
+237
-2
No files matched your search
@@ -36,7 +36,7 @@ namespace RGB.NET.Devices.Corsair
|
||||
/// <inheritdoc />
|
||||
protected override void InitializeLayout()
|
||||
{
|
||||
LedId referenceId = (DeviceInfo.DeviceType == RGBDeviceType.LedStripe ? LedId.LedStripe1 : (DeviceInfo.DeviceType == RGBDeviceType.Fan ? LedId.Fan1 : LedId.Custom1));
|
||||
LedId referenceId = GetReferenceLed(DeviceInfo.DeviceType);
|
||||
|
||||
for (int i = 0; i < DeviceInfo.LedCount; i++)
|
||||
{
|
||||
@@ -52,6 +52,24 @@ namespace RGB.NET.Devices.Corsair
|
||||
/// <inheritdoc />
|
||||
protected override object CreateLedCustomData(LedId ledId) => _idMapping.TryGetValue(ledId, out CorsairLedId id) ? id : CorsairLedId.Invalid;
|
||||
|
||||
protected virtual LedId GetReferenceLed(RGBDeviceType deviceType)
|
||||
{
|
||||
switch (deviceType)
|
||||
{
|
||||
case RGBDeviceType.LedStripe:
|
||||
return LedId.LedStripe1;
|
||||
|
||||
case RGBDeviceType.Fan:
|
||||
return LedId.Fan1;
|
||||
|
||||
case RGBDeviceType.Cooler:
|
||||
return LedId.Cooler1;
|
||||
|
||||
default:
|
||||
return LedId.Custom1;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user