summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--retrace/d3dretrace_dxgi.hpp4
-rwxr-xr-xretrace/dxgiretrace.py5
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);
}
'''