Skip to content

Commit 4e675d6

Browse files
committed
only use debug layer in debug builds
1 parent 4875e56 commit 4e675d6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

graphics.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -842,17 +842,15 @@ void InitD3D(int outputIndex)
842842

843843
Output = AllOutputs[outputIndex];
844844

845-
printf("Using output: %s\n", (const char*)Output.DisplayName);
846-
847845
// create device and upgrade
848846
const D3D_FEATURE_LEVEL levels[] = { D3D_FEATURE_LEVEL_12_1, D3D_FEATURE_LEVEL_12_0, D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0 };
849847
UINT flags = 0;
850-
//#ifdef _DEBUG
848+
#ifdef _DEBUG
851849
flags |= D3D11_CREATE_DEVICE_DEBUG;
852-
//#endif
850+
#endif
853851
RCPtr<ID3D11Device> dev0;
854852
RCPtr<ID3D11DeviceContext> ctx0;
855-
DXERR(D3D11CreateDevice(Output.Adapter, Output.Adapter.IsValid() ? D3D_DRIVER_TYPE_UNKNOWN : D3D_DRIVER_TYPE_HARDWARE, NULL, flags, levels, _countof(levels), D3D11_SDK_VERSION, dev0, &FeatureLevel, ctx0));
853+
DXERR(D3D11CreateDevice(Output.Adapter, Output.Adapter.IsValid() ? D3D_DRIVER_TYPE_UNKNOWN : D3D_DRIVER_TYPE_HARDWARE , NULL, flags, levels, _countof(levels), D3D11_SDK_VERSION, dev0, &FeatureLevel, ctx0));
856854
Dev = dev0;
857855
Ctx = ctx0;
858856

0 commit comments

Comments
 (0)