mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Changed all existing device-providers to use update-queues to decouple the physical update from the internal update-loop (first draft, code-documention is missing)
This commit is contained in:
1 parent
3965bfb9a0
commit
66d03cdf4f
61 files changed
+1125
-440
No files matched your search
@@ -7,6 +7,6 @@ namespace RGB.NET.Devices.Logitech
|
||||
/// </summary>
|
||||
internal interface ILogitechRGBDevice : IRGBDevice
|
||||
{
|
||||
void Initialize();
|
||||
void Initialize(UpdateQueue updateQueue);
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,8 @@ namespace RGB.NET.Devices.Logitech
|
||||
/// </summary>
|
||||
public override TDeviceInfo DeviceInfo { get; }
|
||||
|
||||
protected UpdateQueue UpdateQueue { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
@@ -39,7 +41,7 @@ namespace RGB.NET.Devices.Logitech
|
||||
/// <summary>
|
||||
/// Initializes the device.
|
||||
/// </summary>
|
||||
public void Initialize()
|
||||
public void Initialize(UpdateQueue updateQueue)
|
||||
{
|
||||
InitializeLayout();
|
||||
|
||||
@@ -48,6 +50,8 @@ namespace RGB.NET.Devices.Logitech
|
||||
Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle));
|
||||
Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y);
|
||||
}
|
||||
|
||||
UpdateQueue = updateQueue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user