Skip to content

Commit

Permalink
[d3d9] Fail GetRTData if src and dst have mismatching sizes
Browse files Browse the repository at this point in the history
MySims tries to do this and needs this to fail,
otherwise mouse picking is off.
  • Loading branch information
K0bin committed Feb 5, 2024
1 parent 5312ef1 commit 2b43f22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,9 @@ namespace dxvk {
if (srcTexInfo->Desc()->Format != dstTexInfo->Desc()->Format)
return D3DERR_INVALIDCALL;

if (src->GetSurfaceExtent() != dst->GetSurfaceExtent())
return D3DERR_INVALIDCALL;

if (dstTexInfo->Desc()->Pool == D3DPOOL_DEFAULT)
return this->StretchRect(pRenderTarget, nullptr, pDestSurface, nullptr, D3DTEXF_NONE);

Expand Down

0 comments on commit 2b43f22

Please sign in to comment.