mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Added generic type test to path resolve override
This commit is contained in:
1 parent
254a8e311f
commit
d8e803c531
3 files changed
+25
-1
No files matched your search
@@ -2,6 +2,7 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Artemis.Core.Extensions;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
@@ -30,7 +31,7 @@ namespace Artemis.Plugins.Devices.Corsair
|
||||
|
||||
private void ResolveCorsairPath(object sender, ResolvePathEventArgs e)
|
||||
{
|
||||
if (e.RelativePart.Contains("Layouts\\Corsair"))
|
||||
if (sender.GetType().IsGenericType(typeof(CorsairRGBDevice<>)))
|
||||
{
|
||||
// Start from the plugin directory
|
||||
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePart, e.FileName);
|
||||
|
||||
Reference in new issue
Block a user