From c68259944839da97668a08c22fde0876e29c22a0 Mon Sep 17 00:00:00 2001
From: guitarfreak <[EMAIL REDACTED]>
Date: Fri, 28 Feb 2025 08:36:31 +0100
Subject: [PATCH] GPU_d3d12: Switched the default swapchain scaling mode to
none.
Since there is no option to change it this seems like a much better default value. The stretching behaviour is really off-putting.
The new behavior shows a small black border when resizing the windows. This makes it more in line with the other backends and it's what you would expect to happen as a user.
---
src/gpu/d3d12/SDL_gpu_d3d12.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gpu/d3d12/SDL_gpu_d3d12.c b/src/gpu/d3d12/SDL_gpu_d3d12.c
index b457dfabf997e..be13d8dac5e96 100644
--- a/src/gpu/d3d12/SDL_gpu_d3d12.c
+++ b/src/gpu/d3d12/SDL_gpu_d3d12.c
@@ -6735,7 +6735,7 @@ static bool D3D12_INTERNAL_CreateSwapchain(
swapchainDesc.SampleDesc.Quality = 0;
swapchainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
swapchainDesc.BufferCount = windowData->swapchainTextureCount;
- swapchainDesc.Scaling = DXGI_SCALING_STRETCH;
+ swapchainDesc.Scaling = DXGI_SCALING_NONE;
swapchainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
swapchainDesc.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED;
swapchainDesc.Flags = 0;