From 11b7b1f1a55aa2a2196d7b62f4888bb68042859c Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 22 Sep 2019 19:07:48 +0200 Subject: [PATCH] [d3d11] Implement GetDeviceRemovedReason --- src/d3d11/d3d11_device.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 35147df72..b28703758 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -1733,12 +1733,12 @@ namespace dxvk { HRESULT STDMETHODCALLTYPE D3D11Device::GetDeviceRemovedReason() { - static std::atomic s_errorShown = { false }; - - if (!s_errorShown.exchange(true)) - Logger::warn("D3D11Device::GetDeviceRemovedReason: Stub"); - - return S_OK; + VkResult status = m_dxvkDevice->getDeviceStatus(); + + switch (status) { + case VK_SUCCESS: return S_OK; + default: return DXGI_ERROR_DEVICE_RESET; + } }