mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Added a workaround for the AccessViolation-problem in the aura-sdk
This commit is contained in:
parent
338936d42f
commit
83a3ea4e01
@ -95,7 +95,9 @@ namespace RGB.NET.Devices.Asus
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int mainboardCount = _AsusSDK.EnumerateMbController(IntPtr.Zero, 0);
|
//TODO DarthAffe 26.11.2017: This is not a fix! There might really be a second controller on the mainboard, but for now this should prevent the random crash for some guys.
|
||||||
|
// DarthAffe 26.11.2017: https://rog.asus.com/forum/showthread.php?97754-Access-Violation-Wrong-EnumerateMB-Result&p=688901#post688901
|
||||||
|
int mainboardCount = Math.Max(1, _AsusSDK.EnumerateMbController(IntPtr.Zero, 0));
|
||||||
if (mainboardCount > 0)
|
if (mainboardCount > 0)
|
||||||
{
|
{
|
||||||
IntPtr mainboardHandles = Marshal.AllocHGlobal(mainboardCount * IntPtr.Size);
|
IntPtr mainboardHandles = Marshal.AllocHGlobal(mainboardCount * IntPtr.Size);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user