Skip to content

Commit 8ebb83a

Browse files
author
Floyd Huizinga
committed
Fix ImageLibraryApplication failing at runtime due to missing D3D11_CREATE_DEVICE_DEBUG flag
1 parent b478822 commit 8ebb83a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Cpp/1-getting-started/1-3-1-ImageLibrary/ImageLibraryApplication.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,13 @@ bool ImageLibraryApplication::Initialize()
8888
return false;
8989
}
9090

91+
#if !defined(NDEBUG)
9192
if (FAILED(_device.As(&_debug)))
9293
{
9394
std::cout << "D3D11: Failed to get the debug layer from the device\n";
9495
return false;
9596
}
97+
#endif
9698

9799
constexpr char deviceName[] = "DEV_Main";
98100
_device->SetPrivateData(WKPDID_D3DDebugObjectName, sizeof(deviceName), deviceName);

0 commit comments

Comments
 (0)