From c2bb094008a5aa8db8f95f4280c4127093905fca Mon Sep 17 00:00:00 2001 From: N00MKRAD <61149547+n00mkrad@users.noreply.github.com> Date: Tue, 31 Dec 2024 19:09:06 +0100 Subject: [PATCH] HasGPU check --- CodeLegacy/Os/OsUtils.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CodeLegacy/Os/OsUtils.cs b/CodeLegacy/Os/OsUtils.cs index af95448..56a392f 100644 --- a/CodeLegacy/Os/OsUtils.cs +++ b/CodeLegacy/Os/OsUtils.cs @@ -281,6 +281,23 @@ namespace Flowframes.Os ShowNotification(title, text); } + public static bool HasGpu() + { + int gpusCount = 0; + + if (VulkanUtils.VkDevices != null) + { + gpusCount += VulkanUtils.VkDevices.Count; + } + + if (NvApi.NvGpus != null && NvApi.NvGpus.Any()) + { + gpusCount += NvApi.NvGpus.Count; + } + + return gpusCount > 0; + } + public static string GetGpus() { List gpusVk = new List();