mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 13:44:17 +00:00
Fix DXGI_FEATURE_PRESENT_ALLOW_TEARING feature check
This commit is contained in:
parent
3d7ecf98c2
commit
e0b7b6dc3d
1 changed files with 12 additions and 4 deletions
|
@ -337,13 +337,21 @@ bool D3D11VARenderer::initialize(PDECODER_PARAMETERS params)
|
|||
&allowTearing,
|
||||
sizeof(allowTearing));
|
||||
if (SUCCEEDED(hr)) {
|
||||
// Use flip discard with allow tearing mode if possible.
|
||||
swapChainDesc.Flags |= DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;
|
||||
m_AllowTearing = true;
|
||||
if (allowTearing) {
|
||||
// Use flip discard with allow tearing mode if possible.
|
||||
swapChainDesc.Flags |= DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;
|
||||
m_AllowTearing = true;
|
||||
}
|
||||
else {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"OS/GPU doesn't support DXGI_FEATURE_PRESENT_ALLOW_TEARING");
|
||||
}
|
||||
}
|
||||
else {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"GPU driver doesn't support DXGI_FEATURE_PRESENT_ALLOW_TEARING");
|
||||
"IDXGIFactory::CheckFeatureSupport(DXGI_FEATURE_PRESENT_ALLOW_TEARING) failed: %x",
|
||||
hr);
|
||||
// Non-fatal
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue