Henri Verbeet : ddraw: Destroy the swapchain in the DllMain() cleanup handler.

Alexandre Julliard julliard at winehq.org
Wed Dec 7 13:57:12 CST 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Dec  6 22:57:45 2011 +0100

ddraw: Destroy the swapchain in the DllMain() cleanup handler.

This is mostly to make sure there aren't any resources still being referenced
by wined3d.

---

 dlls/ddraw/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c
index caf9f9b..c9d5139 100644
--- a/dlls/ddraw/main.c
+++ b/dlls/ddraw/main.c
@@ -945,6 +945,9 @@ DllMain(HINSTANCE hInstDLL,
                 IDirectDraw4_AddRef(&ddraw->IDirectDraw4_iface);
                 IDirectDraw7_AddRef(&ddraw->IDirectDraw7_iface);
 
+                if (ddraw->wined3d_swapchain)
+                    ddraw_destroy_swapchain(ddraw);
+
                 /* Does a D3D device exist? Destroy it
                     * TODO: Destroy all Vertex buffers, Lights, Materials
                     * and execute buffers too




More information about the wine-cvs mailing list