浏览代码

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

Zero 10 月之前
父节点
当前提交
2c0ffdc6d5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/gpu/d3d12/SDL_gpu_d3d12.c

+ 2 - 2
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)