mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
dbad6744f3
18 files changed
+412
-182
No files matched your search
@@ -52,13 +52,30 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
if (enable && !Enabled)
|
||||
{
|
||||
Enabled = true;
|
||||
EnablePlugin();
|
||||
PluginInfo.Enabled = true;
|
||||
|
||||
// If enable failed, put it back in a disabled state
|
||||
try
|
||||
{
|
||||
EnablePlugin();
|
||||
}
|
||||
catch
|
||||
{
|
||||
Enabled = false;
|
||||
PluginInfo.Enabled = false;
|
||||
throw;
|
||||
}
|
||||
|
||||
OnPluginEnabled();
|
||||
}
|
||||
else if (!enable && Enabled)
|
||||
{
|
||||
Enabled = false;
|
||||
PluginInfo.Enabled = false;
|
||||
|
||||
// Even if disable failed, still leave it in a disabled state to avoid more issues
|
||||
DisablePlugin();
|
||||
|
||||
OnPluginDisabled();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user