Updated corsair SDK to iCUE SDK v4.0.48

This commit is contained in:
DarthAffe committed 2023-02-10 19:23:34 +01:00
1 parent d60d4833ca
commit 180b0e4538
68 files changed
+2001 -3085

No files matched your search

@@ -2,6 +2,7 @@
// ReSharper disable UnusedMember.Global
using RGB.NET.Core;
using System.Collections.Generic;
namespace RGB.NET.Devices.Corsair;
@@ -26,8 +27,14 @@ public class CorsairKeyboardRGBDevice : CorsairRGBDevice<CorsairKeyboardRGBDevic
/// <param name="info">The specific information provided by CUE for the keyboard.</param>
/// <param name="updateQueue">The queue used to update this device.</param>
internal CorsairKeyboardRGBDevice(CorsairKeyboardRGBDeviceInfo info, CorsairDeviceUpdateQueue updateQueue)
: base(info, LedMappings.Keyboard, updateQueue)
: base(info, updateQueue)
{ }
#endregion
#region Methods
protected override LedMapping<CorsairLedId> CreateMapping(IEnumerable<CorsairLedId> ids) => LedMappings.CreateKeyboardMapping(ids);
#endregion
}
@@ -36,11 +36,12 @@ public class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo, IKeyboardDevic
/// </summary>
/// <param name="deviceIndex">The index of the <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDevice" />.</param>
/// <param name="nativeInfo">The native <see cref="T:RGB.NET.Devices.Corsair.Native._CorsairDeviceInfo" />-struct</param>
internal CorsairKeyboardRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo)
: base(deviceIndex, RGBDeviceType.Keyboard, nativeInfo)
internal CorsairKeyboardRGBDeviceInfo(_CorsairDeviceInfo nativeInfo, int ledCount, int ledOffset)
: base(RGBDeviceType.Keyboard, nativeInfo, ledCount, ledOffset)
{
this.PhysicalLayout = (CorsairPhysicalKeyboardLayout)nativeInfo.physicalLayout;
this.LogicalLayout = (CorsairLogicalKeyboardLayout)nativeInfo.logicalLayout;
PhysicalLayout = (CorsairPhysicalKeyboardLayout)_CUESDK.ReadDevicePropertySimpleInt32(nativeInfo.id!, CorsairDevicePropertyId.PhysicalLayout);
LogicalLayout = (CorsairLogicalKeyboardLayout)_CUESDK.ReadDevicePropertySimpleInt32(nativeInfo.id!, CorsairDevicePropertyId.LogicalLayout);
this.Layout = PhysicalLayout switch
{
CorsairPhysicalKeyboardLayout.US => KeyboardLayoutType.ANSI,