mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Wooting - Fixed race condition during SDK load/unload
This commit is contained in:
1 parent
63498eb8c3
commit
41f9d82edc
3 files changed
+43
-22
No files matched your search
@@ -28,13 +28,16 @@ namespace RGB.NET.Devices.Wooting.Generic
|
||||
/// <inheritdoc />
|
||||
protected override void Update(in ReadOnlySpan<(object key, Color color)> dataSet)
|
||||
{
|
||||
foreach ((object key, Color color) in dataSet)
|
||||
lock (_WootingSDK.SdkLock)
|
||||
{
|
||||
(int row, int column) = ((int, int))key;
|
||||
_WootingSDK.ArraySetSingle((byte)row, (byte)column, color.GetR(), color.GetG(), color.GetB());
|
||||
}
|
||||
foreach ((object key, Color color) in dataSet)
|
||||
{
|
||||
(int row, int column) = ((int, int))key;
|
||||
_WootingSDK.ArraySetSingle((byte)row, (byte)column, color.GetR(), color.GetG(), color.GetB());
|
||||
}
|
||||
|
||||
_WootingSDK.ArrayUpdateKeyboard();
|
||||
_WootingSDK.ArrayUpdateKeyboard();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user