ddraw: fix cases where desc2.u2.dwMipMapCount is 0.

David Hedberg david.hedberg at gmail.com
Sun Sep 2 12:22:47 CDT 2007

Hi again,

I played around a bit with a simple test case, and it seems that my
first attempt at a patch was faulty. From what I can see and what the
test case says, windows does not allow the creation of these surfaces
at all. I've remade the patch to mimic the behaviour of windows, and
also added a test case. Even with this, delta force still seems to
work fine.

Does this look ok?


On 9/2/07, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> Am Sonntag, 2. September 2007 14:16 schrieb David Hedberg:
> > (Resending mail after subscribing to list)
> >
> > Hi,
> >
> > This patch fixes a problem visible in Delta Force Land Warrior and
> > Delta Force Task Force Dagger, where extra_surfaces would sometimes
> > get a value of -1 and later cause a "near infinite" loop in
> > CreateAdditionalSurfaces.
> I think you should test that in the desc2.dwFlags & DDSD_MIPMAPCOUNT case
> above, where currently the "Mipmap count is given, nothing to do" comment is.
> It would be good if you extended the test case in dlls/ddraw/tests/dsurface.c
> to test the case where the mipmapcount flag is set, but the mipmap count is
> 0. It could either create a one-level surface (like your patch currently
> does), or ignore the mipmapcount flag, and create mipmaps until either width
> and height are 0.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ddraw-fixes-situation-where-DDSD_MIPMAPCOUNT-is-set.patch
Type: application/octet-stream
Size: 990 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070902/3fe7251b/0001-ddraw-fixes-situation-where-DDSD_MIPMAPCOUNT-is-set.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ddraw-tests-check-case-where-DDSD_MIPMAPCOUNT-is-se.patch
Type: application/octet-stream
Size: 1441 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070902/3fe7251b/0002-ddraw-tests-check-case-where-DDSD_MIPMAPCOUNT-is-se.obj

More information about the wine-devel mailing list