[PATCH 2/8] ddraw: Delete viewports when destroying the device
Stefan Dösinger
stefan at codeweavers.com
Sat Jan 26 06:39:43 CST 2013
---
dlls/ddraw/device.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index c604c6a..8b4e1e4 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -233,6 +233,7 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
if (!ref)
{
DWORD i;
+ struct list *vp_entry, *vp_entry2;
wined3d_mutex_lock();
@@ -304,6 +305,12 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
ddraw_handle_table_destroy(&This->handle_table);
+ LIST_FOR_EACH_SAFE(vp_entry, vp_entry2, &This->viewport_list)
+ {
+ struct d3d_viewport *vp = LIST_ENTRY(vp_entry, struct d3d_viewport, entry);
+ IDirect3DDevice3_DeleteViewport(&This->IDirect3DDevice3_iface, &vp->IDirect3DViewport3_iface);
+ }
+
TRACE("Releasing target %p.\n", This->target);
/* Release the render target. */
if (This->version != 1)
--
1.7.12.4
More information about the wine-patches
mailing list