wined3d: Go to the fallbacks if D3D is not initialized in surface_blt().

Even though this is the "OpenGL" surface implementation, this can still happen
in e.g. ddraw if no swapchain is created yet. That's something we should fix,
but not today.
This commit is contained in:
Henri Verbeet 2011-08-01 21:35:45 +02:00 committed by Alexandre Julliard
parent 7539cc8faa
commit 98650e841e
1 changed files with 6 additions and 0 deletions

View File

@ -1304,6 +1304,12 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_
goto fallback; goto fallback;
} }
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
goto fallback;
}
dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
if (src_surface) if (src_surface)
src_ds_flags = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); src_ds_flags = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);