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);
}
}
}

View File

@@ -137,7 +137,7 @@ namespace Flowframes.OS
Logger.Log($"You are running Flowframes {installed}. The latest Patreon version is {latestPat}, the latest free version is {latestFree}.");
if (installed.ToString() != "0.0.0")
Program.mainForm.Text = "Flowframes " + installed.ToString();
Program.mainForm.Text = $"Flowframes {installed} [GPU: {OSUtils.GetGpus().Remove("NVIDIA ").Remove("AMD ").Remove("Intel ")}]";
}
public static async Task UpdateModelList()