=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: dxgi: Release target output when releasing swapchain.

Alexandre Julliard julliard at winehq.org
Mon Aug 29 11:07:23 CDT 2016


Module: wine
Branch: master
Commit: a1b075258594d1924c1591c89ad7ce86965fbd02
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a1b075258594d1924c1591c89ad7ce86965fbd02

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Sun Aug 28 22:30:54 2016 +0200

dxgi: Release target output when releasing swapchain.

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>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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();




More information about the wine-cvs mailing list