Commit 7ebdcb35 authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Initialize the dwMipmapCount field even if the application forgets it.

parent 449f6b21
......@@ -355,6 +355,14 @@ create_texture(IDirectDrawImpl* This, const DDSURFACEDESC2 *pDDSD,
GET_BPP(ddsd)*8);
}
/* Check also for the MIPMAP / MIPMAPCOUNT flags.
TODO: check if Windows 'auto-builds' somehow the mip-map levels */
if (((ddsd.dwFlags & DDSD_MIPMAPCOUNT) == 0) &&
((ddsd.ddsCaps.dwCaps & DDSCAPS_MIPMAP) != 0)) {
ddsd.dwFlags |= DDSD_MIPMAPCOUNT;
ddsd.u2.dwMipMapCount = 1;
}
ddsd.dwFlags |= DDSD_PITCH | DDSD_PIXELFORMAT;
hr = This->create_texture(This, &ddsd, ppSurf, pUnkOuter, mipmap_level);
......
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