mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 13:06:24 +00:00
Added exception-handling to all UpdateQueues
This commit is contained in:
1 parent
6e313ea6a1
commit
37e4954583
18 files changed
+222
-97
No files matched your search
@@ -51,10 +51,17 @@ public class OpenRGBUpdateQueue : UpdateQueue
|
||||
/// <inheritdoc />
|
||||
protected override void Update(in ReadOnlySpan<(object key, Color color)> dataSet)
|
||||
{
|
||||
foreach ((object key, Color color) in dataSet)
|
||||
_colors[(int)key] = new OpenRGBColor(color.GetR(), color.GetG(), color.GetB());
|
||||
try
|
||||
{
|
||||
foreach ((object key, Color color) in dataSet)
|
||||
_colors[(int)key] = new OpenRGBColor(color.GetR(), color.GetG(), color.GetB());
|
||||
|
||||
_openRGB.UpdateLeds(_deviceid, _colors);
|
||||
_openRGB.UpdateLeds(_deviceid, _colors);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OpenRGBDeviceProvider.Instance.Throw(ex, true);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user