Support multiple registry path prefixes.
This commit is contained in:
@@ -481,11 +481,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (Platform.CurrentPlatform != PlatformType.Windows)
|
||||
return null;
|
||||
|
||||
var path = Microsoft.Win32.Registry.GetValue(source.RegistryKey, source.RegistryValue, null) as string;
|
||||
if (path == null)
|
||||
return null;
|
||||
foreach (var prefix in source.RegistryPrefixes)
|
||||
{
|
||||
var path = Microsoft.Win32.Registry.GetValue(prefix + source.RegistryKey, source.RegistryValue, null) as string;
|
||||
if (path == null)
|
||||
continue;
|
||||
|
||||
return IsValidSourcePath(path, source) ? path : null;
|
||||
return IsValidSourcePath(path, source) ? path : null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (source.Type == ModContent.SourceType.Disc)
|
||||
|
||||
Reference in New Issue
Block a user