mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 01:58:30 +00:00
Added a method to change the behavior of selecting leds to update in devices
This commit is contained in:
parent
5a0d5ff104
commit
fde6d17bda
@ -86,7 +86,7 @@ namespace RGB.NET.Core
|
||||
DeviceUpdate();
|
||||
|
||||
// Send LEDs to SDK
|
||||
IEnumerable<Led> ledsToUpdate = ((RequiresFlush || flushLeds) ? LedMapping.Values : LedMapping.Values.Where(x => x.IsDirty)).ToList();
|
||||
List<Led> ledsToUpdate = GetLedsToUpdate(flushLeds)?.ToList() ?? new List<Led>();
|
||||
foreach (Led ledToUpdate in ledsToUpdate)
|
||||
ledToUpdate.Update();
|
||||
|
||||
@ -94,6 +94,8 @@ namespace RGB.NET.Core
|
||||
UpdateLeds(ledsToUpdate);
|
||||
}
|
||||
|
||||
protected virtual IEnumerable<Led> GetLedsToUpdate(bool flushLeds) => ((RequiresFlush || flushLeds) ? LedMapping.Values : LedMapping.Values.Where(x => x.IsDirty));
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void SyncBack()
|
||||
{ }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user