File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2540,6 +2540,7 @@ static void D3D11_INTERNAL_CreateSwapChain(
2540
2540
IDXGIDevice1 * dxgiDevice ;
2541
2541
DXGI_COLOR_SPACE_TYPE colorSpace ;
2542
2542
HRESULT res ;
2543
+ int reducedLatency = SDL_GetHintBoolean ("FNA3D_REDUCED_FRAME_LATENCY" , SDL_FALSE );
2543
2544
2544
2545
uint8_t growSwapchains = (swapchainData == NULL );
2545
2546
@@ -2565,7 +2566,7 @@ static void D3D11_INTERNAL_CreateSwapChain(
2565
2566
swapchainDesc .SampleDesc .Count = 1 ;
2566
2567
swapchainDesc .SampleDesc .Quality = 0 ;
2567
2568
swapchainDesc .BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT ;
2568
- swapchainDesc .BufferCount = 3 ;
2569
+ swapchainDesc .BufferCount = reducedLatency ? 2 : 3 ;
2569
2570
swapchainDesc .OutputWindow = dxgiHandle ;
2570
2571
swapchainDesc .Windowed = 1 ;
2571
2572
if (renderer -> supportsTearing )
@@ -2669,7 +2670,7 @@ static void D3D11_INTERNAL_CreateSwapChain(
2669
2670
}
2670
2671
}
2671
2672
2672
- if (SDL_GetHintBoolean ( "FNA3D_REDUCED_FRAME_LATENCY" , SDL_FALSE ) )
2673
+ if (reducedLatency )
2673
2674
{
2674
2675
/*
2675
2676
If possible, limit queued frames to 1. (The default is 3.)
You can’t perform that action at this time.
0 commit comments