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.
This commit is contained in:
Henri Verbeet 2011-12-06 22:57:45 +01:00 committed by Alexandre Julliard
parent 3f455832a3
commit ecb2859d3c
1 changed files with 3 additions and 0 deletions

View File

@ -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