(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:
DarthAffe committed 2023-03-05 18:04:50 +01:00
1 parent 37e4954583
commit 30ccfdcd85
21 files changed
+151 -50

No files matched your search

@@ -49,7 +49,7 @@ public class OpenRGBUpdateQueue : UpdateQueue
#region Methods
/// <inheritdoc />
protected override void Update(in ReadOnlySpan<(object key, Color color)> dataSet)
protected override bool Update(in ReadOnlySpan<(object key, Color color)> dataSet)
{
try
{
@@ -57,11 +57,15 @@ public class OpenRGBUpdateQueue : UpdateQueue
_colors[(int)key] = new OpenRGBColor(color.GetR(), color.GetG(), color.GetB());
_openRGB.UpdateLeds(_deviceid, _colors);
return true;
}
catch (Exception ex)
{
OpenRGBDeviceProvider.Instance.Throw(ex, true);
OpenRGBDeviceProvider.Instance.Throw(ex);
}
return false;
}
#endregion