ddraw: Use the largest dimension to determine the mipmap count for version 7 surfaces.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
68ba8f9037
commit
e53567f72a
|
@ -5873,6 +5873,9 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
|||
{
|
||||
/* Undocumented feature: Create sublevels until either the
|
||||
* width or the height is 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue