Stefan Dösinger : ddraw: Set the DDSCAPS2_MIPMAPSUBLEVEL flag on sublevels.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 9 06:03:15 CDT 2006
Module: wine
Branch: master
Commit: 48b550c9db5fe98be7b632c91a4b2a7235a53938
URL: http://source.winehq.org/git/wine.git/?a=commit;h=48b550c9db5fe98be7b632c91a4b2a7235a53938
Author: Stefan Dösinger <stefandoesinger at gmx.at>
Date: Mon Oct 9 00:29:10 2006 +0200
ddraw: Set the DDSCAPS2_MIPMAPSUBLEVEL flag on sublevels.
---
dlls/ddraw/ddraw.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 594f434..a2177d2 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -2155,6 +2155,9 @@ IDirectDrawImpl_CreateSurface(IDirectDra
return E_POINTER; /* unchecked */
}
+ /* According to the msdn this flag is ignored by CreateSurface */
+ DDSD->ddsCaps.dwCaps2 &= ~DDSCAPS2_MIPMAPSUBLEVEL;
+
/* Modify some flags */
memset(&desc2, 0, sizeof(desc2));
desc2.dwSize = sizeof(desc2); /* For the struct copy */
@@ -2330,6 +2333,11 @@ IDirectDrawImpl_CreateSurface(IDirectDra
desc2.ddsCaps.dwCaps &= ~DDSCAPS_FRONTBUFFER; /* It's not a front buffer */
desc2.ddsCaps.dwCaps |= DDSCAPS_BACKBUFFER;
}
+ /* Set the DDSCAPS2_MIPMAPSUBLEVEL flag on mipmap sublevels according to the msdn */
+ if(DDSD->ddsCaps.dwCaps & DDSCAPS_MIPMAP)
+ {
+ desc2.ddsCaps.dwCaps2 |= DDSCAPS2_MIPMAPSUBLEVEL;
+ }
for(i = 0; i < extra_surfaces; i++)
{
More information about the wine-cvs
mailing list