in cpp/AdvancedColorImages/AdvancedColorImages/DirectXTileRenderer.cpp [117:133]
bool DirectXTileRenderer::CheckForDeviceRemoved(HRESULT hr)
{
if (SUCCEEDED(hr))
{
// Everything is fine -- go ahead and draw
return true;
}
else if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET)
{
// We can't draw at this time, but this failure is recoverable. Just skip drawing for
// now. We will be asked to draw again once the Direct3D device is recreated
return false;
}
// Any other error is unexpected and, therefore, fatal.
check_hresult(hr);
return true;
}