mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
Fixed leds not updating
This commit is contained in:
parent
438e5c576a
commit
e6290ae480
@ -90,10 +90,14 @@ namespace RGB.NET.Core
|
||||
|
||||
// Send LEDs to SDK
|
||||
List<Led> ledsToUpdate = GetLedsToUpdate(flushLeds).ToList();
|
||||
|
||||
foreach (Led led in ledsToUpdate)
|
||||
led.Update();
|
||||
|
||||
UpdateLeds(ledsToUpdate);
|
||||
}
|
||||
|
||||
protected virtual IEnumerable<Led> GetLedsToUpdate(bool flushLeds) => ((RequiresFlush || flushLeds) ? LedMapping.Values : LedMapping.Values.Where(x => x.IsDirty)).Where(led => led.Color.A > 0);
|
||||
protected virtual IEnumerable<Led> 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<Led> leds)
|
||||
{
|
||||
if (ColorCorrections.Count > 0)
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user