mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
(MAJOR) Improved update performance of devices
This commit is contained in:
1 parent
4216dacf4f
commit
764fcd1b1d
13 files changed
+38
-82
No files matched your search
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Logitech;
|
||||
|
||||
@@ -42,8 +40,5 @@ public class LogitechPerDeviceRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInf
|
||||
/// <inheritdoc />
|
||||
protected override object GetLedCustomData(LedId ledId) => _ledMapping[ledId];
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate) => UpdateQueue.SetData(GetUpdateData(ledsToUpdate.Take(1)));
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Logitech;
|
||||
|
||||
@@ -33,9 +32,6 @@ public class LogitechPerKeyRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInfo>,
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override object GetLedCustomData(LedId ledId) => _ledMapping.TryGetValue(ledId, out LogitechLedId logitechLedId) ? logitechLedId : -1;
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate) => UpdateQueue.SetData(GetUpdateData(ledsToUpdate));
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Logitech;
|
||||
|
||||
@@ -41,8 +40,5 @@ public class LogitechZoneRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInfo>, I
|
||||
/// <inheritdoc />
|
||||
protected override object GetLedCustomData(LedId ledId) => _ledMapping[ledId];
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate) => UpdateQueue.SetData(GetUpdateData(ledsToUpdate));
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in new issue
Block a user