SDL: GPU: Pass the new window size when resizing the swapchain for d3d12 (#10665)

From 2c0ffdc6d514f7c864c8693546e545a3fd64e98c Mon Sep 17 00:00:00 2001
From: Zero <[EMAIL REDACTED]>
Date: Sun, 1 Sep 2024 16:48:29 +0100
Subject: [PATCH] GPU: Pass the new window size when resizing the swapchain for
 d3d12 (#10665)

---
 src/gpu/d3d12/SDL_gpu_d3d12.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gpu/d3d12/SDL_gpu_d3d12.c b/src/gpu/d3d12/SDL_gpu_d3d12.c
index d87772617029f..94ca373e702d9 100644
--- a/src/gpu/d3d12/SDL_gpu_d3d12.c
+++ b/src/gpu/d3d12/SDL_gpu_d3d12.c
@@ -6109,8 +6109,8 @@ static bool D3D12_INTERNAL_ResizeSwapchainIfNeeded(
         HRESULT res = IDXGISwapChain_ResizeBuffers(
             windowData->swapchain,
             0, // Keep buffer count the same
-            swapchainDesc.BufferDesc.Width,
-            swapchainDesc.BufferDesc.Height,
+            w,
+            h,
             DXGI_FORMAT_UNKNOWN, // Keep the old format
             renderer->supportsTearing ? DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0);
         ERROR_CHECK_RETURN("Could not resize swapchain buffers", 0)