mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 06:58:30 +00:00
Fixed ERROR: IDXGIFactory::CreateSwapChain: The flag DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING is only allowed for FLIP swapchains
This commit is contained in:
@@ -614,6 +614,7 @@ static HRESULT D3D11_CreateDeviceResources(SDL_Renderer *renderer)
|
||||
#ifdef HAVE_DXGI1_5_H
|
||||
// Check for tearing support, which requires the IDXGIFactory5 interface.
|
||||
data->swapChainFlags = 0;
|
||||
if (!(SDL_GetWindowFlags(renderer->window) & SDL_WINDOW_TRANSPARENT)) {
|
||||
result = IDXGIFactory2_QueryInterface(data->dxgiFactory, &SDL_IID_IDXGIFactory5, (void **)&dxgiFactory5);
|
||||
if (SUCCEEDED(result)) {
|
||||
BOOL allowTearing = FALSE;
|
||||
@@ -623,6 +624,7 @@ static HRESULT D3D11_CreateDeviceResources(SDL_Renderer *renderer)
|
||||
}
|
||||
IDXGIFactory5_Release(dxgiFactory5);
|
||||
}
|
||||
}
|
||||
#endif // HAVE_DXGI1_5_H
|
||||
|
||||
if (SDL_GetHintBoolean(SDL_HINT_RENDER_DIRECT3D11_WARP, false)) {
|
||||
|
Reference in New Issue
Block a user