mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46: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
@@ -27,12 +27,19 @@ public class LogitechPerDeviceUpdateQueue : UpdateQueue
|
||||
/// <inheritdoc />
|
||||
protected override void Update(in ReadOnlySpan<(object key, Color color)> dataSet)
|
||||
{
|
||||
Color color = dataSet[0].color;
|
||||
try
|
||||
{
|
||||
Color color = dataSet[0].color;
|
||||
|
||||
_LogitechGSDK.LogiLedSetTargetDevice(LogitechDeviceCaps.DeviceRGB);
|
||||
_LogitechGSDK.LogiLedSetLighting((int)Math.Round(color.R * 100),
|
||||
(int)Math.Round(color.G * 100),
|
||||
(int)Math.Round(color.B * 100));
|
||||
_LogitechGSDK.LogiLedSetTargetDevice(LogitechDeviceCaps.DeviceRGB);
|
||||
_LogitechGSDK.LogiLedSetLighting((int)Math.Round(color.R * 100),
|
||||
(int)Math.Round(color.G * 100),
|
||||
(int)Math.Round(color.B * 100));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogitechDeviceProvider.Instance.Throw(ex, true);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user