wined3d: Only unload the surface when we're using GL for rendering in updateSurfaceDesc().

This commit is contained in:
Henri Verbeet 2011-12-04 15:50:14 +01:00 committed by Alexandre Julliard
parent 31bf03d8a1
commit c43aa1ada8

View File

@ -5230,7 +5230,8 @@ static HRESULT updateSurfaceDesc(struct wined3d_surface *surface,
surface->resource.multisample_type = swapchain_desc->multisample_type;
surface->resource.multisample_quality = swapchain_desc->multisample_quality;
surface->resource.resource_ops->resource_unload(&surface->resource);
if (device->d3d_initialized)
surface->resource.resource_ops->resource_unload(&surface->resource);
if (surface->pow2Width != swapchain_desc->backbuffer_width
|| surface->pow2Height != swapchain_desc->backbuffer_height)