diff --git a/RGB.NET.Core/Devices/AbstractRGBDevice.cs b/RGB.NET.Core/Devices/AbstractRGBDevice.cs index 7b28a30..db8dba1 100644 --- a/RGB.NET.Core/Devices/AbstractRGBDevice.cs +++ b/RGB.NET.Core/Devices/AbstractRGBDevice.cs @@ -90,10 +90,14 @@ namespace RGB.NET.Core // Send LEDs to SDK List ledsToUpdate = GetLedsToUpdate(flushLeds).ToList(); + + foreach (Led led in ledsToUpdate) + led.Update(); + UpdateLeds(ledsToUpdate); } - protected virtual IEnumerable GetLedsToUpdate(bool flushLeds) => ((RequiresFlush || flushLeds) ? LedMapping.Values : LedMapping.Values.Where(x => x.IsDirty)).Where(led => led.Color.A > 0); + protected virtual IEnumerable GetLedsToUpdate(bool flushLeds) => ((RequiresFlush || flushLeds) ? LedMapping.Values : LedMapping.Values.Where(x => x.IsDirty)).Where(led => led.RequestedColor?.A > 0); protected virtual IEnumerable<(object key, Color color)> GetUpdateData(IEnumerable leds) { if (ColorCorrections.Count > 0) diff --git a/RGB.NET.Core/RGBSurface.cs b/RGB.NET.Core/RGBSurface.cs index 5a26b68..692e158 100644 --- a/RGB.NET.Core/RGBSurface.cs +++ b/RGB.NET.Core/RGBSurface.cs @@ -165,9 +165,6 @@ namespace RGB.NET.Core try { device.Update(flushLeds); } catch (Exception ex) { OnException(ex); } - foreach (Led led in Leds) - led.Update(); - OnUpdated(); } }