Commit f39ca018 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

d3d11va: only create the device with the debug flag in debug builds

With a debugger attached.
In UWP we can assume it's present with MS build and no debug with mingw
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent fc421acf
......@@ -427,8 +427,17 @@ static int D3dCreateDevice(vlc_va_t *va)
#endif
UINT creationFlags = D3D11_CREATE_DEVICE_VIDEO_SUPPORT;
#if !defined(NDEBUG) //&& defined(_MSC_VER)
creationFlags |= D3D11_CREATE_DEVICE_DEBUG;
#if !defined(NDEBUG)
#if !VLC_WINSTORE_APP
if (IsDebuggerPresent())
#endif
{
HINSTANCE sdklayer_dll = LoadLibrary(TEXT("d3d11_1sdklayers.dll"));
if (sdklayer_dll) {
creationFlags |= D3D11_CREATE_DEVICE_DEBUG;
FreeLibrary(sdklayer_dll);
}
}
#endif
/* */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment