make intel driver versions great again

This commit is contained in:
13xforever 2019-12-05 19:41:16 +05:00
parent c19dd01098
commit 4f268b6102

View File

@ -449,6 +449,16 @@ namespace CompatBot.Utils.ResultFormatters
return AmdDriverVersionProvider.GetFromVulkanAsync(result).ConfigureAwait(false).GetAwaiter().GetResult();
}
if (gpu.Contains("Intel", StringComparison.InvariantCultureIgnoreCase)
&& Version.TryParse(result, out var ver)
&& ver.Minor > 400
&& ver.Build >= 0)
{
var build = ((ver.Minor & 0b_11) << 12) | ver.Build;
var minor = ver.Minor >> 2;
return new Version(ver.Major, minor, build).ToString();
}
if (result.EndsWith(".0.0"))
result = result[..^4];
if (result.Length > 3 && result[^2] == '.')