Update swap chain validation in ResizeD3D function

Modified the conditional check in `ResizeD3D` to use
`(IDXGISwapChain*)&g_swapChainProxy` instead of `g_pSwapChain`.
This change ensures the correct proxy is validated. Updated
the debug print statement for clearer output regarding
the render manager's device and swap chain pointers.
This commit is contained in:
Revela 2026-03-19 12:07:43 -05:00
parent 4fffcac6e7
commit 34cb0b10e4

View file

@ -1012,11 +1012,11 @@ static bool ResizeD3D(int newW, int newH)
// Verify offsets by checking device and swap chain pointers
ID3D11Device** ppRM_Device = (ID3D11Device**)(pRM + 0x10);
if (*ppRM_Device != g_pd3dDevice || *ppRM_SC != g_pSwapChain)
if (*ppRM_Device != g_pd3dDevice || *ppRM_SC != (IDXGISwapChain*)&g_swapChainProxy)
{
app.DebugPrintf("[RESIZE] ERROR: RenderManager offset verification failed! "
"device=%p (expected %p) swapchain=%p (expected %p)\n",
*ppRM_Device, g_pd3dDevice, *ppRM_SC, g_pSwapChain);
*ppRM_Device, g_pd3dDevice, *ppRM_SC, (IDXGISwapChain*)&g_swapChainProxy);
return false;
}