Henri Verbeet : ddraw: Use the largest dimension to determine the mipmap count for version 7 surfaces.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jan 6 14:50:57 CST 2016
Module: wine
Branch: master
Commit: e53567f72abd99d7667f2f7b58ed3a5943eb0c80
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e53567f72abd99d7667f2f7b58ed3a5943eb0c80
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Jan 6 15:52:05 2016 +0100
ddraw: Use the largest dimension to determine the mipmap count for version 7 surfaces.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ddraw/surface.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 0976603..9b845d2 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -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
More information about the wine-cvs
mailing list