Plugins - Added timeout for plugin enable

Plugins - Delete lock file even on exception, only leave it in place on crash
Plugins - Added --ignore-plugin-lock startup argument
UI - Renamed -autorun argument to --autorun
This commit is contained in:
SpoinkyNL committed 2020-06-29 23:24:49 +02:00
1 parent c80e5e42aa
commit 58e07ae5bd
11 files changed
+56 -27

No files matched your search

@@ -1,6 +1,8 @@
using System.IO;
using System.Threading.Tasks;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Services.Interfaces;
using Microsoft.Win32;
using RGB.NET.Core;
using RGB.NET.Devices.Corsair;
@@ -22,6 +24,21 @@ namespace Artemis.Plugins.Devices.Corsair
RGB.NET.Devices.Corsair.CorsairDeviceProvider.PossibleX64NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x64", "CUESDK.x64_2017.dll"));
RGB.NET.Devices.Corsair.CorsairDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "CUESDK_2017.dll"));
_rgbService.AddDeviceProvider(RgbDeviceProvider);
SystemEvents.PowerModeChanged += SystemEventsOnPowerModeChanged;
}
private void SystemEventsOnPowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
// This may be required for some device providers
// if (e.Mode == PowerModes.Resume)
// {
// Task.Run(async () =>
// {
// await Task.Delay(5000);
// RGB.NET.Devices.Corsair.CorsairDeviceProvider.Instance.Initialize();
// });
// }
}
}
}