From 34cb0b10e45a48a9d263619230f203c3ab457b78 Mon Sep 17 00:00:00 2001 From: Revela Date: Thu, 19 Mar 2026 12:07:43 -0500 Subject: [PATCH] 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. --- Minecraft.Client/Windows64/Windows64_Minecraft.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index 8e112d81..f1b458d1 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -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; }