From 223aff8b3f73bb786dce5c67b83ff55208d43969 Mon Sep 17 00:00:00 2001 From: Marijn Tamis Date: Mon, 31 Jul 2017 13:52:20 +0200 Subject: NvCloth 1.1.2 Release. (22576033) --- NvCloth/samples/SampleBase/core/Application.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'NvCloth/samples/SampleBase/core/Application.cpp') 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++) -- cgit v1.2.3