mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-11 04:56:44 +00:00
Updated CUE SDK to 2.4.67
Implemented SDK change: ledsCount added to DeviceInfo Implemented SDK change: CorsairGetLedPositionsByDeviceIndex method added Added mousemat support
This commit is contained in:
1 parent
5a296dd048
commit
6c1a3d6744
16 files changed
+350
-9
No files matched your search
+14
-1
@@ -36,12 +36,13 @@ namespace CUE.NET.Native
|
||||
if (_dllHandle != IntPtr.Zero) return;
|
||||
|
||||
// HACK: Load library at runtime to support both, x86 and x64 with one managed dll
|
||||
_dllHandle = LoadLibrary((LoadedArchitecture = Environment.Is64BitProcess ? "x64" : "x86") + "/CUESDK_2013.dll");
|
||||
_dllHandle = LoadLibrary((LoadedArchitecture = Environment.Is64BitProcess ? "x64" : "x86") + "/CUESDK_2015.dll");
|
||||
|
||||
_corsairSetLedsColorsPointer = (CorsairSetLedsColorsPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairSetLedsColors"), typeof(CorsairSetLedsColorsPointer));
|
||||
_corsairGetDeviceCountPointer = (CorsairGetDeviceCountPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairGetDeviceCount"), typeof(CorsairGetDeviceCountPointer));
|
||||
_corsairGetDeviceInfoPointer = (CorsairGetDeviceInfoPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairGetDeviceInfo"), typeof(CorsairGetDeviceInfoPointer));
|
||||
_corsairGetLedPositionsPointer = (CorsairGetLedPositionsPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairGetLedPositions"), typeof(CorsairGetLedPositionsPointer));
|
||||
_corsairGetLedPositionsByDeviceIndexPointer = (CorsairGetLedPositionsByDeviceIndexPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairGetLedPositionsByDeviceIndex"), typeof(CorsairGetLedPositionsByDeviceIndexPointer));
|
||||
_corsairGetLedIdForKeyNamePointer = (CorsairGetLedIdForKeyNamePointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairGetLedIdForKeyName"), typeof(CorsairGetLedIdForKeyNamePointer));
|
||||
_corsairRequestControlPointer = (CorsairRequestControlPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairRequestControl"), typeof(CorsairRequestControlPointer));
|
||||
_corsairReleaseControlPointer = (CorsairReleaseControlPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairReleaseControl"), typeof(CorsairReleaseControlPointer));
|
||||
@@ -78,6 +79,7 @@ namespace CUE.NET.Native
|
||||
private static CorsairGetDeviceInfoPointer _corsairGetDeviceInfoPointer;
|
||||
private static CorsairGetLedPositionsPointer _corsairGetLedPositionsPointer;
|
||||
private static CorsairGetLedIdForKeyNamePointer _corsairGetLedIdForKeyNamePointer;
|
||||
private static CorsairGetLedPositionsByDeviceIndexPointer _corsairGetLedPositionsByDeviceIndexPointer;
|
||||
private static CorsairRequestControlPointer _corsairRequestControlPointer;
|
||||
private static CorsairReleaseControlPointer _corsairReleaseControlPointer;
|
||||
private static CorsairPerformProtocolHandshakePointer _corsairPerformProtocolHandshakePointer;
|
||||
@@ -99,6 +101,9 @@ namespace CUE.NET.Native
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate IntPtr CorsairGetLedPositionsPointer();
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate IntPtr CorsairGetLedPositionsByDeviceIndexPointer(int deviceIndex);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate CorsairKeyboardKeyId CorsairGetLedIdForKeyNamePointer(char keyName);
|
||||
|
||||
@@ -150,6 +155,14 @@ namespace CUE.NET.Native
|
||||
return _corsairGetLedPositionsPointer();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: provides list of keyboard or mousemat LEDs with their physical positions.
|
||||
/// </summary>
|
||||
internal static IntPtr CorsairGetLedPositionsByDeviceIndex(int deviceIndex)
|
||||
{
|
||||
return _corsairGetLedPositionsByDeviceIndexPointer(deviceIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: retrieves led id for key name taking logical layout into account.
|
||||
/// </summary>
|
||||
|
||||
@@ -39,5 +39,10 @@ namespace CUE.NET.Native
|
||||
/// CUE-SDK: mask that describes device capabilities, formed as logical “or” of CorsairDeviceCaps enum values
|
||||
/// </summary>
|
||||
internal int capsMask;
|
||||
|
||||
/// <summary>
|
||||
/// CUE-SDK: number of controllable LEDs on the device
|
||||
/// </summary>
|
||||
internal int ledsCount;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user