From d82333519cc96c0c978dca3e60416aa8da6083e5 Mon Sep 17 00:00:00 2001 From: Quantum Date: Mon, 19 Jul 2021 19:54:09 -0400 Subject: [PATCH] [host] dxgi: use SDK versionhelpers.h to test for Windows version Also, changed logic so that Windows versions before 8 is not treated as 10. --- host/platform/Windows/capture/DXGI/src/dxgi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/host/platform/Windows/capture/DXGI/src/dxgi.c b/host/platform/Windows/capture/DXGI/src/dxgi.c index 00d477ab..82188766 100644 --- a/host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/host/platform/Windows/capture/DXGI/src/dxgi.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "dxgi_extra.h" @@ -340,15 +341,15 @@ static bool dxgi_init(void) const D3D_FEATURE_LEVEL * featureLevels; unsigned int featureLevelCount; - if (IsWindows8()) + if (IsWindows10OrGreater()) { - featureLevels = win8; - featureLevelCount = sizeof(win8) / sizeof(D3D_FEATURE_LEVEL); + featureLevels = win10; + featureLevelCount = ARRAY_LENGTH(win10); } else { - featureLevels = win10; - featureLevelCount = sizeof(win10) / sizeof(D3D_FEATURE_LEVEL); + featureLevels = win8; + featureLevelCount = ARRAY_LENGTH(win8); } IDXGIAdapter * tmp;