mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Updated Fody
Add support for overriding ResolvingAbsolutePath
This commit is contained in:
1 parent
dcf206dbaf
commit
51e72cad16
5 files changed
+27
-8
No files matched your search
@@ -5,6 +5,7 @@ using System.Reflection;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.Corsair;
|
||||
|
||||
namespace Artemis.Plugins.Devices.Corsair
|
||||
@@ -21,11 +22,21 @@ namespace Artemis.Plugins.Devices.Corsair
|
||||
|
||||
public override void EnablePlugin()
|
||||
{
|
||||
PathHelper.ResolvingAbsolutePath += ResolveCorsairPath;
|
||||
CorsairDeviceProvider.PossibleX64NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x64", "CUESDK.dll"));
|
||||
CorsairDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "CUESDK.dll"));
|
||||
_rgbService.AddDeviceProvider(CorsairDeviceProvider.Instance);
|
||||
}
|
||||
|
||||
private void ResolveCorsairPath(object sender, ResolvePathEventArgs e)
|
||||
{
|
||||
if (e.RelativePart.Contains("Layouts\\Corsair"))
|
||||
{
|
||||
// Start from the plugin directory
|
||||
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePart, e.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DisablePlugin()
|
||||
{
|
||||
// TODO: Remove the device provider from the surface
|
||||
|
||||
Reference in new issue
Block a user