GPU list in window title

This commit is contained in:
n00mkrad
2021-08-10 00:14:48 +02:00
parent ff027736fd
commit bebd947b7a
2 changed files with 22 additions and 1 deletions

View File

@@ -242,5 +242,26 @@ namespace Flowframes.OS
ShowNotification(title, text);
}
public static string GetGpus ()
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_DisplayConfiguration");
List<string> gpus = new List<string>();
foreach (ManagementObject mo in searcher.Get())
{
foreach (PropertyData property in mo.Properties)
{
if (property.Name == "Description")
{
gpus.Add(property.Value.ToString());
Logger.Log("[GetGpus] Found GPU: " + gpus, true);
}
}
}
return string.Join(", ", gpus);
}
}
}