mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-03-03 15:29:22 +00:00
change nvidia driver version formatting
This commit is contained in:
parent
7535dd61a4
commit
08d3527c28
@ -566,10 +566,19 @@ namespace CompatBot.Utils.ResultFormatters
|
||||
return new Version(ver.Major, minor, build).ToString();
|
||||
}
|
||||
|
||||
if (result.EndsWith(".0.0"))
|
||||
result = result[..^4];
|
||||
if (result.Length > 3 && result[^2] == '.')
|
||||
result = result[..^1] + "0" + result[^1];
|
||||
if (Version.TryParse(result, out var nvVer))
|
||||
{
|
||||
result = $"{nvVer.Major}.{nvVer.Minor:00}";
|
||||
if (nvVer.Build > 0)
|
||||
result += $".{nvVer.Build}";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result.EndsWith(".0.0"))
|
||||
result = result[..^4];
|
||||
if (result.Length > 3 && result[^2] == '.')
|
||||
result = result[..^1] + "0" + result[^1];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user