mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Streamlined device loading/handling in device providers
This commit is contained in:
1 parent
f6f3e9185c
commit
2a9a43683c
81 files changed
+867
-1864
No files matched your search
@@ -17,26 +17,25 @@ namespace RGB.NET.Devices.Logitech
|
||||
/// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Logitech.LogitechPerDeviceRGBDevice" /> class.
|
||||
/// </summary>
|
||||
/// <param name="info">The specific information provided by logitech for the per-device-lightable device</param>
|
||||
internal LogitechPerDeviceRGBDevice(LogitechRGBDeviceInfo info)
|
||||
: base(info)
|
||||
{ }
|
||||
internal LogitechPerDeviceRGBDevice(LogitechRGBDeviceInfo info, IUpdateQueue updateQueue)
|
||||
: base(info, updateQueue)
|
||||
{
|
||||
InitializeLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(UpdateQueue updateQueue)
|
||||
private void InitializeLayout()
|
||||
{
|
||||
base.Initialize(updateQueue);
|
||||
|
||||
AddLed(LedId.Custom1, new Point(0, 0), new Size(10, 10));
|
||||
}
|
||||
/// <inheritdoc />
|
||||
protected override object GetLedCustomData(LedId ledId) => (ledId, LogitechLedId.DEVICE);
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate) => UpdateQueue?.SetData(GetUpdateData(ledsToUpdate.Take(1)));
|
||||
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate) => UpdateQueue.SetData(GetUpdateData(ledsToUpdate.Take(1)));
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user