summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-07-25 03:51:39 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-07-25 03:51:39 +0000
commit0cd32284bef1dbdec0cf484cfcd940ce2dca449c (patch)
tree9ec13cef129913dcf6e8e5f926cec3f8f9e8c0fd /Graphics/GraphicsEngineD3DBase
parentFixed issue with DXGI swap chain not supporting DXGI_SCALING_NONE on Windows 7 (diff)
downloadDiligentCore-0cd32284bef1dbdec0cf484cfcd940ce2dca449c.tar.gz
DiligentCore-0cd32284bef1dbdec0cf484cfcd940ce2dca449c.zip
Fixed UWP build issue related to windows version check
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h b/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h
index 1afdd1d6..d434449c 100644
--- a/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h
+++ b/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h
@@ -112,8 +112,13 @@ namespace Diligent
// ;
swapChainDesc.BufferCount = m_SwapChainDesc.BufferCount;
- // DXGI_SCALING_NONE is not supported in Windows 7
- swapChainDesc.Scaling = IsWindows8OrGreater() ? DXGI_SCALING_NONE : DXGI_SCALING_STRETCH;
+ swapChainDesc.Scaling = DXGI_SCALING_NONE;
+
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ // DXGI_SCALING_NONE is supported starting with Windows 8
+ if (!IsWindows8OrGreater())
+ swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
+#endif
// DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is the flip presentation model, where the contents of the back
// buffer is preserved after the call to Present. This flag cannot be used with multisampling.