Module: wine Branch: master Commit: 68e1484bec61784cc026db4885439097e789cb0c URL: http://source.winehq.org/git/wine.git/?a=commit;h=68e1484bec61784cc026db4885...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Oct 17 21:06:21 2011 +0200
wined3d: Mark default pool surfaces lost when they're unloaded.
---
dlls/wined3d/surface.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c7bba27..277a317 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1866,6 +1866,11 @@ static void surface_unload(struct wined3d_resource *resource) * and all flags get lost */ surface_init_sysmem(surface); + /* We also get here when the ddraw swapchain is destroyed, for example + * for a mode switch. In this case this surface won't necessarily be + * an implicit surface. We have to mark it lost so that the + * application can restore it after the mode switch. */ + surface->flags |= SFLAG_LOST; } else { @@ -2966,7 +2971,6 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface) { TRACE("surface %p.\n", surface);
- /* So far we don't lose anything :) */ surface->flags &= ~SFLAG_LOST; return WINED3D_OK; }