Renamed CUESDK to fit general native class-naming, added missing x86 dll-imports

This commit is contained in:
DarthAffe committed 2015-09-18 23:41:16 +02:00
1 parent b47abedae2
commit ebdbe69e7c
4 files changed
+54 -18

No files matched your search

+2 -2
View File
@@ -24,13 +24,13 @@ namespace CUE.NET.Wrapper
public void SetKeyColor(char key, Color color)
{
CorsairLedId id = CUESDK.CorsairGetLedIdForKeyName(key);
CorsairLedId id = _CUESDK.CorsairGetLedIdForKeyName(key);
_CorsairLedColor ledColor = new _CorsairLedColor { ledId = id, r = color.R, g = color.G, b = color.B };
//TODO DarthAffe 18.09.2015: Generalize and move to base class
IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(_CorsairLedColor)));
Marshal.StructureToPtr(ledColor, ptr, true);
CUESDK.CorsairSetLedsColors(1, ptr);
_CUESDK.CorsairSetLedsColors(1, ptr);
}
#endregion
+5 -5
View File
@@ -15,7 +15,7 @@ namespace CUE.NET.Wrapper
public static CorsairProtocolDetails ProtocolDetails { get; private set; }
public static bool HasExclusiveAccess { get; private set; }
public static CorsairError LastError => CUESDK.CorsairGetLastError();
public static CorsairError LastError => _CUESDK.CorsairGetLastError();
public static CueKeyboard KeyboardSDK { get; private set; }
public static CueMouse MouseSDK { get; private set; }
@@ -32,7 +32,7 @@ namespace CUE.NET.Wrapper
if (ProtocolDetails != null)
throw new WrapperException("CueSDK is already initialized.");
ProtocolDetails = new CorsairProtocolDetails(CUESDK.CorsairPerformProtocolHandshake());
ProtocolDetails = new CorsairProtocolDetails(_CUESDK.CorsairPerformProtocolHandshake());
CorsairError error = LastError;
if (error != CorsairError.CE_Success)
@@ -40,16 +40,16 @@ namespace CUE.NET.Wrapper
if (exclusiveAccess)
{
if (!CUESDK.CorsairRequestControl(CorsairAccessMode.CAM_ExclusiveLightingControl))
if (!_CUESDK.CorsairRequestControl(CorsairAccessMode.CAM_ExclusiveLightingControl))
Throw(error);
HasExclusiveAccess = true;
}
int deviceCount = CUESDK.CorsairGetDeviceCount();
int deviceCount = _CUESDK.CorsairGetDeviceCount();
for (int i = 0; i < deviceCount; i++)
{
CorsairDeviceInfo info = new CorsairDeviceInfo((_CorsairDeviceInfo)Marshal.PtrToStructure(CUESDK.CorsairGetDeviceInfo(i), typeof(_CorsairDeviceInfo)));
CorsairDeviceInfo info = new CorsairDeviceInfo((_CorsairDeviceInfo)Marshal.PtrToStructure(_CUESDK.CorsairGetDeviceInfo(i), typeof(_CorsairDeviceInfo)));
switch (info.Type)
{
case CorsairDeviceType.CDT_Keyboard: