diff --git a/Devices/Generic/CorsairProtocolDetails.cs b/Devices/Generic/CorsairProtocolDetails.cs index 2f53ea1..5db94d6 100644 --- a/Devices/Generic/CorsairProtocolDetails.cs +++ b/Devices/Generic/CorsairProtocolDetails.cs @@ -54,8 +54,8 @@ namespace CUE.NET.Devices.Generic /// The native CorsairProtocolDetails-struct internal CorsairProtocolDetails(_CorsairProtocolDetails nativeDetails) { - this.SdkVersion = nativeDetails.sdkVersion == IntPtr.Zero ? null : Marshal.PtrToStringAuto(nativeDetails.sdkVersion); - this.ServerVersion = nativeDetails.serverVersion == IntPtr.Zero ? null : Marshal.PtrToStringAuto(nativeDetails.serverVersion); + this.SdkVersion = nativeDetails.sdkVersion == IntPtr.Zero ? null : Marshal.PtrToStringAnsi(nativeDetails.sdkVersion); + this.ServerVersion = nativeDetails.serverVersion == IntPtr.Zero ? null : Marshal.PtrToStringAnsi(nativeDetails.serverVersion); this.SdkProtocolVersion = nativeDetails.sdkProtocolVersion; this.ServerProtocolVersion = nativeDetails.serverProtocolVersion; this.BreakingChanges = nativeDetails.breakingChanges != 0; diff --git a/Devices/Generic/GenericDeviceInfo.cs b/Devices/Generic/GenericDeviceInfo.cs index 030918d..a9d9cce 100644 --- a/Devices/Generic/GenericDeviceInfo.cs +++ b/Devices/Generic/GenericDeviceInfo.cs @@ -38,7 +38,7 @@ namespace CUE.NET.Devices.Generic internal GenericDeviceInfo(_CorsairDeviceInfo nativeInfo) { this.Type = nativeInfo.type; - this.Model = nativeInfo.model == IntPtr.Zero ? null : Marshal.PtrToStringAuto(nativeInfo.model); + this.Model = nativeInfo.model == IntPtr.Zero ? null : Marshal.PtrToStringAnsi(nativeInfo.model); this.CapsMask = (CorsairDeviceCaps)nativeInfo.capsMask; } diff --git a/Examples/SimpleDevTest/Program.cs b/Examples/SimpleDevTest/Program.cs index 92444b3..119a98c 100644 --- a/Examples/SimpleDevTest/Program.cs +++ b/Examples/SimpleDevTest/Program.cs @@ -3,14 +3,14 @@ using System.Drawing; using System.Threading; using System.Threading.Tasks; using CUE.NET; +using CUE.NET.Brushes; using CUE.NET.Devices.Generic.Enums; using CUE.NET.Devices.Keyboard; -using CUE.NET.Devices.Keyboard.Brushes; -using CUE.NET.Devices.Keyboard.Brushes.Gradient; using CUE.NET.Devices.Keyboard.Enums; using CUE.NET.Devices.Keyboard.Extensions; using CUE.NET.Devices.Keyboard.Keys; using CUE.NET.Exceptions; +using CUE.NET.Gradients; namespace SimpleDevTest {