Commit 10db40ce authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Don't overwrite the caller specified pitch in ddraw_surface_init().

parent 162bc8db
...@@ -6059,10 +6059,10 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, s ...@@ -6059,10 +6059,10 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, s
else else
surface->surface_desc.u1.dwLinearSize = max(4, desc->dwWidth) * max(4, desc->dwHeight); surface->surface_desc.u1.dwLinearSize = max(4, desc->dwWidth) * max(4, desc->dwHeight);
} }
else else if (!(desc->dwFlags & DDSD_LPSURFACE))
{ {
surface->surface_desc.dwFlags |= DDSD_PITCH; desc->dwFlags |= DDSD_PITCH;
surface->surface_desc.u1.lPitch = wined3d_surface_get_pitch(wined3d_surface); desc->u1.lPitch = wined3d_surface_get_pitch(wined3d_surface);
} }
if (desc->dwFlags & DDSD_LPSURFACE) if (desc->dwFlags & DDSD_LPSURFACE)
......
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