Commit 30d9926a authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw: Don't re-write the surface's pixelformat.

The pixelformat is passed in in ddraw form in the desc parameter, which is copied into the surface's DDSURFACEDESC2 structure, so the format is already set.
parent 745fbe08
......@@ -5215,7 +5215,6 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
return hr;
}
surface->surface_desc.dwFlags |= DDSD_PIXELFORMAT;
wined3d_resource = wined3d_surface_get_resource(surface->wined3d_surface);
wined3d_resource_get_desc(wined3d_resource, &wined3d_desc);
......@@ -5224,7 +5223,6 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
{
FIXME("IWineD3DSurface::GetDesc returned WINED3DFMT_UNKNOWN.\n");
}
PixelFormat_WineD3DtoDD(&surface->surface_desc.u4.ddpfPixelFormat, format);
/* Anno 1602 stores the pitch right after surface creation, so make sure
* it's there. TODO: Test other fourcc formats. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment