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.