mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
Merge pull request #231 from 13xforever/vnext
Improve GPU driver checks when no game was booted
This commit is contained in:
@@ -119,8 +119,8 @@ namespace CompatBot.Utils.ResultFormatters
|
||||
}
|
||||
}
|
||||
|
||||
if (supportedGpu
|
||||
&& items["gpu_info"] is string gpuInfo)
|
||||
var gpuInfo = items["gpu_info"] ?? items["discrete_gpu_info"];
|
||||
if (supportedGpu && !string.IsNullOrEmpty(gpuInfo))
|
||||
{
|
||||
if (IntelGpuModel.Match(gpuInfo) is Match intelMatch
|
||||
&& intelMatch.Success)
|
||||
|
||||
@@ -153,10 +153,20 @@ namespace CompatBot.Utils.ResultFormatters
|
||||
|
||||
if (items["vulkan_compatible_device_name"] is string vulkanDevices)
|
||||
{
|
||||
var deviceNames = vulkanDevices.Split(Environment.NewLine)
|
||||
var devices = vulkanDevices.Split(Environment.NewLine)
|
||||
.Distinct()
|
||||
.Select(n => $"{n} ({GetVulkanDriverVersion(n, items["vulkan_found_device"])})");
|
||||
items["gpu_available_info"] = string.Join(Environment.NewLine, deviceNames);
|
||||
.Select(n => new {name = n, driverVersion = GetVulkanDriverVersion(n, items["vulkan_found_device"])})
|
||||
.Reverse()
|
||||
.ToList();
|
||||
if (string.IsNullOrEmpty(items["gpu_info"]) && devices.Count > 0)
|
||||
{
|
||||
var discreteGpu = devices.FirstOrDefault(d => IsNvidia(d.name))
|
||||
?? devices.FirstOrDefault(d => IsAmd(d.name))
|
||||
?? devices.First();
|
||||
items["discrete_gpu_info"] = $"{discreteGpu.name} ({discreteGpu.driverVersion})";
|
||||
items["driver_version_info"] = discreteGpu.driverVersion;
|
||||
}
|
||||
items["gpu_available_info"] = string.Join(Environment.NewLine, devices.Select(d => $"{d.name} ({d.driverVersion})"));
|
||||
}
|
||||
|
||||
if (items["af_override"] is string af)
|
||||
|
||||
Reference in New Issue
Block a user