ddraw: Delete viewports when destroying the device.

This commit is contained in:
Stefan Dösinger 2013-01-26 13:39:43 +01:00 committed by Alexandre Julliard
parent 9a0b2a5100
commit b822c259fd
1 changed files with 7 additions and 0 deletions

View File

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