[PATCH 2/5] ddraw: Destroy the swapchain in the DllMain() cleanup handler.
Henri Verbeet
hverbeet at codeweavers.com
Tue Dec 6 15:57:45 CST 2011
This is mostly to make sure there aren't any resources still being references
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
--
1.7.3.4
More information about the wine-patches
mailing list