diff options
author | José Fonseca <jfonseca@vmware.com> | 2014-09-17 19:45:38 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2014-09-24 14:57:08 +0100 |
commit | 188c61c51f1f1b80e01280d3f516915160994180 (patch) | |
tree | b7b2aaa3156e3e265ea52ce7a2a899c875080f0d | |
parent | 40a9fe4ff09e8f8b0456ed1cb03196c9f31f46d4 (diff) |
d3dretrace: Reset DXGI_SWAP_CHAIN_FLAG_NONPREROTATED when forcing windowed.
As it's only allowed on fullscreen mode.
-rw-r--r-- | retrace/d3dretrace_dxgi.hpp | 4 | ||||
-rwxr-xr-x | retrace/dxgiretrace.py | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/retrace/d3dretrace_dxgi.hpp b/retrace/d3dretrace_dxgi.hpp index 3da74039..7187fc80 100644 --- a/retrace/d3dretrace_dxgi.hpp +++ b/retrace/d3dretrace_dxgi.hpp @@ -221,8 +221,10 @@ HRESULT STDMETHODCALLTYPE CDXGIFactoryDWM::CreateSwapChain(IUnknown *pDevice, DX { IDXGISwapChain *pSwapChain = NULL; if (retrace::forceWindowed) { - pDesc->Windowed = TRUE; + assert(pDesc->Windowed); } + assert(!pDesc->OutputWindow); + pDesc->OutputWindow = d3dretrace::createWindow(pDesc->BufferDesc.Width, pDesc->BufferDesc.Height); HRESULT hr = m_pFactory->CreateSwapChain(pDevice, pDesc, &pSwapChain); if (SUCCEEDED(hr)) { if (!retrace::forceWindowed) { diff --git a/retrace/dxgiretrace.py b/retrace/dxgiretrace.py index 7a6e7c83..41fc4795 100755 --- a/retrace/dxgiretrace.py +++ b/retrace/dxgiretrace.py @@ -428,8 +428,11 @@ createWindow(DXGI_SWAP_CHAIN_DESC *pSwapChainDesc) { if (!Height) Height = 768; if (retrace::forceWindowed) { pSwapChainDesc->Windowed = TRUE; + pSwapChainDesc->Flags &= ~DXGI_SWAP_CHAIN_FLAG_NONPREROTATED; + } + if (pSwapChainDesc->OutputWindow) { + pSwapChainDesc->OutputWindow = d3dretrace::createWindow(Width, Height); } - pSwapChainDesc->OutputWindow = d3dretrace::createWindow(Width, Height); } ''' |