Skip to content

Commit

Permalink
synchronize DeviceManager.UpdateDevices()
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Oct 25, 2024
1 parent a30257c commit b1846da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Project-Aurora/Project-Aurora/Devices/DeviceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using AuroraRgb.Modules;
Expand Down Expand Up @@ -77,6 +78,7 @@ private void OnDeviceManagerInfoOnUpdated(object? o, EventArgs eventArgs)
UpdateDevices();
}

[MethodImpl(MethodImplOptions.Synchronized)]
private void UpdateDevices()
{
var deviceManagerInfo = _deviceManagerInfo.ReadElement();
Expand Down Expand Up @@ -177,7 +179,7 @@ public void Detach()
_detached = true;
}

public void UpdateDevices(IReadOnlyDictionary<DeviceKeys, SimpleColor> keyColors)
public void UpdateDevices(Dictionary<DeviceKeys, SimpleColor> keyColors)
{
_sharedDeviceColor.WriteDictionary(keyColors);
}
Expand Down

0 comments on commit b1846da

Please sign in to comment.