Skip to content

Commit

Permalink
[d3d9] Adjust device reset failure error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterSnowfall authored and K0bin committed Dec 4, 2024
1 parent f23c749 commit 17b85ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ namespace dxvk {
if (unlikely(m_losableResourceCounter.load() != 0 && !IsExtended() && m_d3d9Options.countLosableResources)) {
Logger::warn(str::format("Device reset failed because device still has alive losable resources: Device not reset. Remaining resources: ", m_losableResourceCounter.load()));
m_deviceLostState = D3D9DeviceLostState::NotReset;
return D3DERR_DEVICELOST;
// D3D8 returns D3DERR_DEVICELOST here, whereas D3D9 returns D3DERR_INVALIDCALL.
return m_isD3D8Compatible ? D3DERR_DEVICELOST : D3DERR_INVALIDCALL;
}

hr = ResetSwapChain(pPresentationParameters, nullptr);
Expand Down

0 comments on commit 17b85ac

Please sign in to comment.