ddraw: fix cases where desc2.u2.dwMipMapCount is 0.
stefandoesinger at gmx.at
Sun Sep 2 07:45:01 CDT 2007
Am Sonntag, 2. September 2007 14:16 schrieb David Hedberg:
> (Resending mail after subscribing to list)
> 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
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.
More information about the wine-devel