From ad143789fc911fc2e169b97e0b1ac7630dd9dff3 Mon Sep 17 00:00:00 2001 From: n00mkrad Date: Sun, 12 Sep 2021 02:31:59 +0200 Subject: [PATCH] Exclude "Microsoft"... GPUs --- Code/Os/OsUtils.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Code/Os/OsUtils.cs b/Code/Os/OsUtils.cs index 2cbafec..cc694f6 100644 --- a/Code/Os/OsUtils.cs +++ b/Code/Os/OsUtils.cs @@ -280,8 +280,13 @@ namespace Flowframes.Os { if (property.Name == "Description") { - gpus.Add(property.Value.ToString()); - Logger.Log($"[GetGpus] Found GPU: {property.Value}", true); + string gpuName = property.Value.ToString(); + + if (!gpuName.ToLower().Contains("microsoft")) // To ignore pseudo-GPUs like on vServers, RDP sessions, etc. (e.g. "Microsoft Basic Display Adapter") + { + gpus.Add(gpuName); + Logger.Log($"[GetGpus] Found GPU: {property.Value}", true); + } } } //string gpuName = queryObj["Name"].ToString();