Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/dxgi/device.c | 4 ++-- dlls/dxgi/dxgi_private.h | 2 +- dlls/dxgi/swapchain.c | 12 +++++------- 3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index d6dd0418c47..e3dc52b8ed6 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -474,7 +474,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX return E_OUTOFMEMORY; }
- if (FAILED(hr = d3d11_swapchain_init(object, device, &wined3d_desc, FALSE))) + if (FAILED(hr = d3d11_swapchain_init(object, device, &wined3d_desc))) { WARN("Failed to initialise swapchain, hr %#x.\n", hr); heap_free(object); @@ -578,7 +578,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l return E_OUTOFMEMORY; }
- if (FAILED(hr = d3d11_swapchain_init(swapchain, device, &swapchain_desc, TRUE))) + if (FAILED(hr = d3d11_swapchain_init(swapchain, device, &swapchain_desc))) { WARN("Failed to initialize swapchain, hr %#x.\n", hr); heap_free(swapchain); diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index 5c5775ca377..b6999c729a4 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -178,7 +178,7 @@ struct d3d11_swapchain };
HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device, - struct wined3d_swapchain_desc *desc, BOOL implicit) DECLSPEC_HIDDEN; + struct wined3d_swapchain_desc *desc) DECLSPEC_HIDDEN;
HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *queue, HWND window, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index 17f9a1e43d6..53da2081e89 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -779,16 +779,14 @@ static const struct wined3d_parent_ops d3d11_swapchain_wined3d_parent_ops = };
HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device, - struct wined3d_swapchain_desc *desc, BOOL implicit) + struct wined3d_swapchain_desc *desc) { HRESULT hr;
- /* - * A reference to the implicit swapchain is held by the wined3d device. - * In order to avoid circular references we do not keep a reference - * to the device in the implicit swapchain. - */ - if (!implicit) + /* A reference to the implicit swapchain is held by the wined3d device. In + * order to avoid circular references we do not keep a reference to the + * device in the implicit swapchain. */ + if (!(desc->flags & WINED3D_SWAPCHAIN_IMPLICIT)) { if (desc->backbuffer_format == WINED3DFMT_UNKNOWN) return E_INVALIDARG;