summaryrefslogtreecommitdiffstats
path: root/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp')
-rw-r--r--src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp
index cf62843f7..7dd2e6557 100644
--- a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp
+++ b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp
@@ -86,6 +86,14 @@ struct QWinRTVideoRendererControlGlobal
hr = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags,
featureLevels, ARRAYSIZE(featureLevels), D3D11_SDK_VERSION,
&device, &featureLevel, &context);
+#ifdef _DEBUG
+ if (FAILED(hr)) {
+ qErrnoWarning(hr, "Failed to create D3D device with device debug flag");
+ hr = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, D3D11_CREATE_DEVICE_VIDEO_SUPPORT,
+ featureLevels, ARRAYSIZE(featureLevels), D3D11_SDK_VERSION,
+ &device, &featureLevel, &context);
+ }
+#endif
if (FAILED(hr))
qErrnoWarning(hr, "Failed to create D3D device");