diff options
| author | Marijn Tamis <[email protected]> | 2017-07-31 13:52:20 +0200 |
|---|---|---|
| committer | Marijn Tamis <[email protected]> | 2017-07-31 13:52:20 +0200 |
| commit | 223aff8b3f73bb786dce5c67b83ff55208d43969 (patch) | |
| tree | 2e3e2760cb49afbf8d9379e23e27d175bbba27aa /NvCloth/samples/SampleBase/core | |
| parent | Remove unused copy of PxShared. (diff) | |
| download | nvcloth-1.1.2.tar.xz nvcloth-1.1.2.zip | |
NvCloth 1.1.2 Release. (22576033)v1.1.2
Diffstat (limited to 'NvCloth/samples/SampleBase/core')
| -rw-r--r-- | NvCloth/samples/SampleBase/core/Application.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/NvCloth/samples/SampleBase/core/Application.cpp b/NvCloth/samples/SampleBase/core/Application.cpp index a7f81f1..2a7808b 100644 --- a/NvCloth/samples/SampleBase/core/Application.cpp +++ b/NvCloth/samples/SampleBase/core/Application.cpp @@ -44,11 +44,19 @@ int Application::run() #endif deviceParams.featureLevel = D3D_FEATURE_LEVEL_11_0; - if (FAILED(m_deviceManager->CreateWindowDeviceAndSwapChain(deviceParams, m_sampleName.c_str()))) + if(FAILED(m_deviceManager->CreateWindowDeviceAndSwapChain(deviceParams, m_sampleName.c_str()))) { - MessageBoxA(nullptr, "Cannot initialize the D3D11 device with the requested parameters", "Error", - MB_OK | MB_ICONERROR); - return 1; + //retry without debug device flag + if(deviceParams.createDeviceFlags | D3D11_CREATE_DEVICE_DEBUG) + { + deviceParams.createDeviceFlags ^= D3D11_CREATE_DEVICE_DEBUG; + } + if(FAILED(m_deviceManager->CreateWindowDeviceAndSwapChain(deviceParams, m_sampleName.c_str()))) + { + MessageBoxA(nullptr, "Cannot initialize the D3D11 device with the requested parameters", "Error", + MB_OK | MB_ICONERROR); + return 1; + } } for (auto it = m_controllers.begin(); it != m_controllers.end(); it++) |