Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dxcap -forcetdr
- HRESULT hr = /*m_swapChain->ResizeBuffers(...) or m_swapChain->Present(...) */
- if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET)
- {
- #ifdef _DEBUG
- char buff[64] = {};
- sprintf_s(buff, "Device Lost: Reason code 0x%08Xn",
- (hr == DXGI_ERROR_DEVICE_REMOVED) ? m_d3dDevice->GetDeviceRemovedReason() : hr);
- OutputDebugStringA(buff);
- #endif
- // If the device was removed for any reason, a new device
- // and swap chain will need to be created.
- HandleDeviceLost();
- }
- else
- {
- // Any other failed result is a fatal fast-fail
- DX::ThrowIfFailed(hr);
- }
Add Comment
Please, Sign In to add comment