mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Merge branch 'master' into RGB.NET_update
This commit is contained in:
commit
da90c0d3a1
94 files changed
+1525
-1007
No files matched your search
@@ -51,12 +51,6 @@ namespace Artemis.Core.DeviceProviders
|
||||
/// </summary>
|
||||
public bool CanDetectLogicalLayout { get; protected set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Disable()
|
||||
{
|
||||
// Does not happen with device providers, they require Artemis to restart
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads a layout for the specified device and wraps it in an <see cref="ArtemisLayout" />
|
||||
/// </summary>
|
||||
|
||||
@@ -178,12 +178,15 @@ namespace Artemis.Core
|
||||
{
|
||||
foreach (PluginFeature feature in Features)
|
||||
feature.Dispose();
|
||||
SetEnabled(false);
|
||||
|
||||
Kernel?.Dispose();
|
||||
PluginLoader?.Dispose();
|
||||
|
||||
GC.Collect();
|
||||
GC.WaitForPendingFinalizers();
|
||||
|
||||
_features.Clear();
|
||||
SetEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,10 +73,10 @@ namespace Artemis.Core
|
||||
|
||||
if (!enable)
|
||||
{
|
||||
IsEnabled = false;
|
||||
|
||||
// Even if disable failed, still leave it in a disabled state to avoid more issues
|
||||
InternalDisable();
|
||||
IsEnabled = false;
|
||||
|
||||
OnDisabled();
|
||||
return;
|
||||
}
|
||||
@@ -129,7 +129,8 @@ namespace Artemis.Core
|
||||
|
||||
internal virtual void InternalDisable()
|
||||
{
|
||||
Disable();
|
||||
if (IsEnabled)
|
||||
Disable();
|
||||
}
|
||||
|
||||
#region IDisposable
|
||||
@@ -145,7 +146,7 @@ namespace Artemis.Core
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
Disable();
|
||||
InternalDisable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user