try to match amd driver version with minor revision changes

This commit is contained in:
13xforever 2019-08-09 20:26:56 +05:00
parent 9182311a41
commit 0df6dd46e6

View File

@ -79,6 +79,20 @@ namespace CompatBot.Database.Providers
return $"newer than {newest.vv} ({openglVersion})";
}
var approximate = glVersions.FirstOrDefault(v => v.v.Minor == glVersion.Minor && v.v.Build == glVersion.Build);
if (!string.IsNullOrEmpty(approximate.vv))
return $"{approximate.vv} rev {glVersion.Revision}";
if (string.IsNullOrEmpty(approximate.vv))
for (var i = 0; i < glVersions.Count - 1; i++)
if (glVersion > glVersions[i].v && glVersion < glVersions[i + 1].v)
{
approximate = glVersions[i];
break;
}
if (!string.IsNullOrEmpty(approximate.vv))
return $"probably {approximate.vv}";
}
return openglVersion;