diff --git a/Code/Os/OsUtils.cs b/Code/Os/OsUtils.cs index cbb8879..ce950dc 100644 --- a/Code/Os/OsUtils.cs +++ b/Code/Os/OsUtils.cs @@ -270,20 +270,15 @@ namespace Flowframes.Os public static string GetGpus () { - ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_DisplayConfiguration"); + ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_DisplayControllerConfiguration"); List gpus = new List(); - foreach (ManagementObject mo in searcher.Get()) + foreach (ManagementObject queryObj in searcher.Get()) { - foreach (PropertyData property in mo.Properties) - { - if (property.Name == "Description") - { - gpus.Add(property.Value.ToString()); - Logger.Log($"[GetGpus] Found GPU: {property.Value}", true); - } - } + string gpuName = queryObj["Name"].ToString(); + gpus.Add(gpuName); + Logger.Log($"[GetGpus] Found GPU: {gpuName}", true); } return string.Join(", ", gpus);