1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-04 01:29:26 +01:00

[d3d9] Adjust device reset failure error codes

This commit is contained in:
WinterSnowfall 2024-11-27 11:16:24 +02:00 committed by Robin Kertels
parent f23c74949a
commit 17b85accfb

View File

@ -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);