From ecb2859d3c3beedb0af7de26e4f21d664513cca2 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 6 Dec 2011 22:57:45 +0100 Subject: [PATCH] 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 file changed, 3 insertions(+) diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index caf9f9b27c2..c9d513930f7 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