1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

Adapted SteelSeries-queue to color-rework

This commit is contained in:
Darth Affe 2019-03-31 13:39:56 +02:00
parent 751ca0afa9
commit def02f19c2
2 changed files with 11 additions and 1 deletions

View File

@ -2,6 +2,7 @@
using System.Linq;
using RGB.NET.Core;
using RGB.NET.Devices.SteelSeries.API;
using RGB.NET.Devices.SteelSeries.Helper;
namespace RGB.NET.Devices.SteelSeries
{
@ -37,7 +38,7 @@ namespace RGB.NET.Devices.SteelSeries
/// <inheritdoc />
protected override void Update(Dictionary<object, Color> dataSet)
{
SteelSeriesSDK.UpdateLeds(_deviceType, dataSet.ToDictionary(x => ((SteelSeriesLedId)x.Key).GetAPIName(), x => new int[] { x.Value.R, x.Value.G, x.Value.B }));
SteelSeriesSDK.UpdateLeds(_deviceType, dataSet.ToDictionary(x => ((SteelSeriesLedId)x.Key).GetAPIName(), x => x.Value.ToIntArray()));
}
#endregion

View File

@ -0,0 +1,9 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.SteelSeries.Helper
{
internal static class ColorExtensions
{
internal static int[] ToIntArray(this Color color) => new int[] { color.GetR(), color.GetB(), color.GetG() };
}
}