mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 05:53:40 +00:00
[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.
This commit is contained in:
parent
5421bd8b1d
commit
d82333519c
@ -35,6 +35,7 @@
|
||||
#include <dxgi.h>
|
||||
#include <d3d11.h>
|
||||
#include <d3dcommon.h>
|
||||
#include <versionhelpers.h>
|
||||
|
||||
#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;
|
||||
|
Loading…
Reference in New Issue
Block a user