mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-13 09:08:34 +00:00
Added indicator which architecture is used to the SDK-Wrapper
This commit is contained in:
parent
ed6cd0ca3e
commit
0b5c9ef188
@ -17,6 +17,7 @@ namespace CUE.NET
|
|||||||
|
|
||||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
|
public static string LoadedArchitecture => _CUESDK.LoadedArchitecture;
|
||||||
public static CorsairProtocolDetails ProtocolDetails { get; private set; }
|
public static CorsairProtocolDetails ProtocolDetails { get; private set; }
|
||||||
public static bool HasExclusiveAccess { get; private set; }
|
public static bool HasExclusiveAccess { get; private set; }
|
||||||
public static CorsairError LastError => _CUESDK.CorsairGetLastError();
|
public static CorsairError LastError => _CUESDK.CorsairGetLastError();
|
||||||
|
|||||||
@ -30,6 +30,7 @@ namespace SimpleDevTest
|
|||||||
{
|
{
|
||||||
// Initialize CUE-SDK
|
// Initialize CUE-SDK
|
||||||
CueSDK.Initialize();
|
CueSDK.Initialize();
|
||||||
|
Console.WriteLine("Initialized with " + CueSDK.LoadedArchitecture + "-SDK");
|
||||||
|
|
||||||
// Get connected keyboard or throw exception if there is no light controllable keyboard connected
|
// Get connected keyboard or throw exception if there is no light controllable keyboard connected
|
||||||
CorsairKeyboard keyboard = CueSDK.KeyboardSDK;
|
CorsairKeyboard keyboard = CueSDK.KeyboardSDK;
|
||||||
|
|||||||
@ -10,10 +10,12 @@ namespace CUE.NET.Native
|
|||||||
{
|
{
|
||||||
#region Libary Management
|
#region Libary Management
|
||||||
|
|
||||||
|
internal static string LoadedArchitecture { get; private set; }
|
||||||
|
|
||||||
static _CUESDK()
|
static _CUESDK()
|
||||||
{
|
{
|
||||||
// HACK: Load library at runtime to support both, x86 and x64 with one managed dll
|
// HACK: Load library at runtime to support both, x86 and x64 with one managed dll
|
||||||
LoadLibrary((Environment.Is64BitProcess ? "x64" : "x86") + "/CUESDK_2013.dll");
|
LoadLibrary((LoadedArchitecture = Environment.Is64BitProcess ? "x64" : "x86") + "/CUESDK_2013.dll");
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("kernel32.dll")]
|
[DllImport("kernel32.dll")]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user