Skip to content

Commit 871126b

Browse files
author
Aytackydln
committed
add "Logitech G Legacy LED SDK" for valid Lightsync dll product names
1 parent 45ef638 commit 871126b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Project-Aurora/Project-Aurora/Modules/Logitech/LgsInstallationUtils.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Diagnostics;
1+
using System.Collections.Frozen;
2+
using System.Diagnostics;
23
using System.IO;
34
using Microsoft.Win32;
45

@@ -7,6 +8,11 @@ namespace AuroraRgb.Modules.Logitech;
78
public static class LgsInstallationUtils
89
{
910
public const string LgsExe = "lcore.exe";
11+
private static readonly FrozenSet<string> LgsProductNames = new[]
12+
{
13+
"Logitech Gaming LED SDK",
14+
"Logitech G Legacy LED SDK",
15+
}.ToFrozenSet();
1016

1117
public static bool IsLgsInstalled()
1218
{
@@ -42,8 +48,6 @@ public static bool DllInstalled()
4248

4349
private static bool DllInstalled(string? path)
4450
{
45-
const string dllProductName = "Logitech Gaming LED SDK";
46-
4751
if (path == null)
4852
{
4953
return false;
@@ -56,6 +60,7 @@ private static bool DllInstalled(string? path)
5660
}
5761

5862
var attributes = FileVersionInfo.GetVersionInfo(path);
59-
return attributes.FileDescription == dllProductName;
63+
var productName = attributes.FileDescription;
64+
return productName != null && LgsProductNames.Contains(productName);
6065
}
6166
}

0 commit comments

Comments
 (0)