1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[dxgi] Don't allow changing the FRAME_LATENCY_WAITABLE_OBJECT flag

This commit is contained in:
Philip Rebohle 2019-11-26 15:36:20 +01:00
parent 9785fba66e
commit 7446d3c58a
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -281,6 +281,11 @@ namespace dxvk {
UINT SwapChainFlags) {
if (!IsWindow(m_window))
return DXGI_ERROR_INVALID_CALL;
constexpr UINT PreserveFlags = DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT;
if ((m_desc.Flags & PreserveFlags) != (SwapChainFlags & PreserveFlags))
return DXGI_ERROR_INVALID_CALL;
std::lock_guard<std::mutex> lock(m_lockBuffer);
m_desc.Width = Width;