mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Added native-unload to all deviceprovider-disposes
This commit is contained in:
1 parent
c98ffd2dbf
commit
1cfdeefde1
17 files changed
+60
-29
No files matched your search
@@ -108,7 +108,7 @@ namespace RGB.NET.Devices.CoolerMaster
|
||||
{
|
||||
RGBDeviceType deviceType = index.GetDeviceType();
|
||||
if (deviceType == RGBDeviceType.None) continue;
|
||||
|
||||
|
||||
if (_CoolerMasterSDK.IsDevicePlugged(index))
|
||||
{
|
||||
if (!loadFilter.HasFlag(deviceType)) continue;
|
||||
@@ -185,6 +185,9 @@ namespace RGB.NET.Devices.CoolerMaster
|
||||
}
|
||||
catch {/* shit happens */}
|
||||
}
|
||||
|
||||
try { _CoolerMasterSDK.UnloadCMSDK(); }
|
||||
catch { /* at least we tried */ }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace RGB.NET.Devices.CoolerMaster.Native
|
||||
_setAllLedColorPointer = (SetAllLedColorPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "SetAllLedColor"), typeof(SetAllLedColorPointer));
|
||||
}
|
||||
|
||||
private static void UnloadCMSDK()
|
||||
internal static void UnloadCMSDK()
|
||||
{
|
||||
if (_dllHandle == IntPtr.Zero) return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user