mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +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
@@ -25,16 +25,17 @@ namespace RGB.NET.Devices.Corsair
|
||||
/// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Corsair.CorsairCustomRGBDevice" /> class.
|
||||
/// </summary>
|
||||
/// <param name="info">The specific information provided by CUE for the custom-device.</param>
|
||||
internal CorsairCustomRGBDevice(CorsairCustomRGBDeviceInfo info)
|
||||
: base(info)
|
||||
{ }
|
||||
internal CorsairCustomRGBDevice(CorsairCustomRGBDeviceInfo info, CorsairDeviceUpdateQueue updateQueue)
|
||||
: base(info, updateQueue)
|
||||
{
|
||||
InitializeLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void InitializeLayout()
|
||||
private void InitializeLayout()
|
||||
{
|
||||
LedId referenceId = GetReferenceLed(DeviceInfo.DeviceType);
|
||||
|
||||
@@ -45,7 +46,7 @@ namespace RGB.NET.Devices.Corsair
|
||||
AddLed(ledId, new Point(i * 10, 0), new Size(10, 10));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override object GetLedCustomData(LedId ledId) => _idMapping.TryGetValue(ledId, out CorsairLedId id) ? id : CorsairLedId.Invalid;
|
||||
|
||||
protected virtual LedId GetReferenceLed(RGBDeviceType deviceType)
|
||||
|
||||
Reference in new issue
Block a user