Guest User

Untitled

a guest
Oct 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. dxcap -forcetdr
  2.  
  3. HRESULT hr = /*m_swapChain->ResizeBuffers(...) or m_swapChain->Present(...) */
  4.  
  5. if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET)
  6. {
  7. #ifdef _DEBUG
  8. char buff[64] = {};
  9. sprintf_s(buff, "Device Lost: Reason code 0x%08Xn",
  10. (hr == DXGI_ERROR_DEVICE_REMOVED) ? m_d3dDevice->GetDeviceRemovedReason() : hr);
  11. OutputDebugStringA(buff);
  12. #endif
  13. // If the device was removed for any reason, a new device
  14. // and swap chain will need to be created.
  15. HandleDeviceLost();
  16. }
  17. else
  18. {
  19. // Any other failed result is a fatal fast-fail
  20. DX::ThrowIfFailed(hr);
  21. }
Add Comment
Please, Sign In to add comment