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

direct3d11: only report leaks when there's a debugger

It seems plenty of people have issues with d3d11_1sdklayers.dll being present
but not usable.
If a dev has the issue he can always disable this code section for testing.

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 1245ae2f
......@@ -1484,10 +1484,15 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
HRESULT hr = S_OK;
# if !defined(NDEBUG)
HINSTANCE sdklayer_dll = LoadLibrary(TEXT("d3d11_1sdklayers.dll"));
if (sdklayer_dll) {
creationFlags |= D3D11_CREATE_DEVICE_DEBUG;
FreeLibrary(sdklayer_dll);
# 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