From ab3593185f45971977b956323c0a60f66f9f35e7 Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Mon, 5 Feb 2024 19:14:01 +0100 Subject: [PATCH] [d3d9] Fail GetRTData if src and dst have mismatching sizes MySims tries to do this and needs this to fail, otherwise mouse picking is off. --- src/d3d9/d3d9_device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 92b0eb21..a5fc7f5d 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -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);