[PATCH 6/8] ddraw: Unset the viewport if the current vp is deleted
Stefan Dösinger
stefan at codeweavers.com
Sat Jan 26 06:39:47 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 ace6a12..eca9d69 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -833,6 +833,13 @@ static HRESULT WINAPI d3d_device3_DeleteViewport(IDirect3DDevice3 *iface, IDirec
return DDERR_INVALIDPARAMS;
}
+ if (device->current_viewport == vp)
+ {
+ TRACE("Deleting current viewport, unsetting and releasing\n");
+ IDirect3DViewport3_Release(viewport);
+ device->current_viewport = NULL;
+ }
+
vp->active_device = NULL;
list_remove(&vp->entry);
--
1.7.12.4
More information about the wine-patches
mailing list