mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 21:16:24 +00:00
Rewrote Corsair device handling to use mappings
This commit is contained in:
1 parent
2d0fd93b5f
commit
1e229324be
23 files changed
+284
-395
No files matched your search
@@ -19,22 +19,8 @@ namespace RGB.NET.Devices.Corsair
|
||||
/// </summary>
|
||||
/// <param name="info">The specific information provided by CUE for the headset</param>
|
||||
internal CorsairHeadsetRGBDevice(CorsairHeadsetRGBDeviceInfo info, CorsairDeviceUpdateQueue updateQueue)
|
||||
: base(info, updateQueue)
|
||||
{
|
||||
InitializeLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
private void InitializeLayout()
|
||||
{
|
||||
AddLed(LedId.Headset1, new Point(0, 0), new Size(10, 10));
|
||||
AddLed(LedId.Headset2, new Point(10, 0), new Size(10, 10));
|
||||
}
|
||||
|
||||
protected override object GetLedCustomData(LedId ledId) => HeadsetIdMapping.DEFAULT.TryGetValue(ledId, out CorsairLedId id) ? id : CorsairLedId.Invalid;
|
||||
: base(info, LedMappings.Headset, updateQueue)
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Corsair
|
||||
{
|
||||
internal static class HeadsetIdMapping
|
||||
{
|
||||
internal static readonly Dictionary<LedId, CorsairLedId> DEFAULT = new()
|
||||
{
|
||||
{ LedId.Headset1, CorsairLedId.LeftLogo },
|
||||
{ LedId.Headset2, CorsairLedId.RightLogo },
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user