From 279b4b7ec225c2c4bddc4eb6ddfa8bfe89c8bf5c Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Thu, 2 Jun 2022 13:48:18 -0500 Subject: [PATCH] [d3d9] Defer surface creation if no HWND is given to device Planetary Annihilation: TITANS creates a device with a NULL HWND and requires it to succeed. --- src/d3d9/d3d9_swapchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d9/d3d9_swapchain.cpp b/src/d3d9/d3d9_swapchain.cpp index fc32bb41..a1799117 100644 --- a/src/d3d9/d3d9_swapchain.cpp +++ b/src/d3d9/d3d9_swapchain.cpp @@ -199,7 +199,7 @@ namespace dxvk { m_window = m_presentParams.hDeviceWindow; UpdatePresentRegion(nullptr, nullptr); - if (!pDevice->GetOptions()->deferSurfaceCreation) + if (m_window && !pDevice->GetOptions()->deferSurfaceCreation) CreatePresenter(); CreateBackBuffers(m_presentParams.BackBufferCount);