mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
(MAJOR) Added success-indication to device updates and forced flushes after nonsuccessful ones.
Added exception handling the last missing queues.
This commit is contained in:
1 parent
37e4954583
commit
30ccfdcd85
21 files changed
+151
-50
No files matched your search
@@ -46,13 +46,26 @@ internal class SteelSeriesDeviceUpdateQueue : UpdateQueue
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SteelSeriesDeviceProvider.Instance.Throw(ex, true);
|
||||
SteelSeriesDeviceProvider.Instance.Throw(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Update(in ReadOnlySpan<(object key, Color color)> dataSet)
|
||||
=> SteelSeriesSDK.UpdateLeds(_deviceType, dataSet.ToArray().Select(x => (((SteelSeriesLedId)x.key).GetAPIName(), x.color.ToIntArray())).Where(x => x.Item1 != null).ToList()!);
|
||||
protected override bool Update(in ReadOnlySpan<(object key, Color color)> dataSet)
|
||||
{
|
||||
try
|
||||
{
|
||||
SteelSeriesSDK.UpdateLeds(_deviceType, dataSet.ToArray().Select(x => (((SteelSeriesLedId)x.key).GetAPIName(), x.color.ToIntArray())).Where(x => x.Item1 != null).ToList()!);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SteelSeriesDeviceProvider.Instance.Throw(ex);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in new issue
Block a user