mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
Fixed EnviromentVariables in NativePaths for all device providers
This commit is contained in:
1 parent
437ec50345
commit
b3145a70d9
6 files changed
+26
-14
No files matched your search
@@ -37,7 +37,9 @@ internal static class _CoolerMasterSDK
|
||||
if (_dllHandle != IntPtr.Zero) return;
|
||||
|
||||
// HACK: Load library at runtime to support both, x86 and x64 with one managed dll
|
||||
List<string> possiblePathList = Environment.Is64BitProcess ? CoolerMasterDeviceProvider.PossibleX64NativePaths : CoolerMasterDeviceProvider.PossibleX86NativePaths;
|
||||
List<string> possiblePathList = (Environment.Is64BitProcess ? CoolerMasterDeviceProvider.PossibleX64NativePaths : CoolerMasterDeviceProvider.PossibleX86NativePaths)
|
||||
.Select(Environment.ExpandEnvironmentVariables)
|
||||
.ToList();
|
||||
string? dllPath = possiblePathList.FirstOrDefault(File.Exists);
|
||||
if (dllPath == null) throw new RGBDeviceException($"Can't find the CoolerMaster-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
||||
|
||||
|
||||
Reference in new issue
Block a user