[PATCH 2/2] dxgi: Release target output when releasing swapchain.

Józef Kucia jkucia at codeweavers.com
Sun Aug 28 15:30:54 CDT 2016


It should never happen because applications are required to call
SetFullscreenState() to exit fullscreen mode before releasing the
swapchain.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/dxgi/swapchain.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c
index a759885..2b61327 100644
--- a/dlls/dxgi/swapchain.c
+++ b/dlls/dxgi/swapchain.c
@@ -78,6 +78,11 @@ static ULONG STDMETHODCALLTYPE dxgi_swapchain_Release(IDXGISwapChain *iface)
     if (!refcount)
     {
         IWineDXGIDevice *device = swapchain->device;
+        if (swapchain->target)
+        {
+            WARN("Releasing fullscreen swapchain.\n");
+            IDXGIOutput_Release(swapchain->target);
+        }
         if (swapchain->factory)
             IDXGIFactory_Release(swapchain->factory);
         wined3d_mutex_lock();
-- 
2.7.3




More information about the wine-patches mailing list