Commit e53567f7 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Use the largest dimension to determine the mipmap count for version 7 surfaces.

parent 68ba8f90
......@@ -5873,7 +5873,10 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
{
/* Undocumented feature: Create sublevels until either the
* width or the height is 1. */
desc->u2.dwMipMapCount = wined3d_log2i(min(desc->dwWidth, desc->dwHeight)) + 1;
if (version == 7)
desc->u2.dwMipMapCount = wined3d_log2i(max(desc->dwWidth, desc->dwHeight)) + 1;
else
desc->u2.dwMipMapCount = wined3d_log2i(min(desc->dwWidth, desc->dwHeight)) + 1;
}
}
else
......
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