mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +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
@@ -228,7 +228,7 @@ namespace RGB.NET.Devices.Asus
|
||||
catch { if (throwExceptions) throw; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
UpdateTrigger?.Start();
|
||||
|
||||
Devices = new ReadOnlyCollection<IRGBDevice>(devices);
|
||||
@@ -267,7 +267,10 @@ namespace RGB.NET.Devices.Asus
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{ }
|
||||
{
|
||||
try { _AsusSDK.UnloadAsusSDK(); }
|
||||
catch { /* at least we tried */ }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace RGB.NET.Devices.Asus.Native
|
||||
//_getDramColorPointer = (GetDramColorPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "GetDramColor"), typeof(GetDramColorPointer));
|
||||
}
|
||||
|
||||
private static void UnloadAsusSDK()
|
||||
internal static void UnloadAsusSDK()
|
||||
{
|
||||
if (_dllHandle == IntPtr.Zero) return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user