[PATCH] ddraw/tests: Avoid endless loop, when T&L is not supported

Detlef Riekenberg wine.dev at web.de
Tue Feb 19 13:21:12 CST 2008


---
 dlls/ddraw/tests/d3d.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
index e51f476..678b1f0 100644
--- a/dlls/ddraw/tests/d3d.c
+++ b/dlls/ddraw/tests/d3d.c
@@ -358,6 +358,12 @@ static void LightTest(void)
     rc = IDirect3DDevice7_GetCaps(lpD3DDevice, &caps);
     ok(rc == D3D_OK, "IDirect3DDevice7_GetCaps failed with %x\n", rc);
 
+    if ( caps.dwMaxActiveLights == (DWORD) -1) {
+        /* Some cards without T&L Support return -1 (Examples: Vodoo banshee, RivaTNT / NV4) */
+        skip("T&L not supported\n");
+        return;
+    }
+
     for(i = 1; i <= caps.dwMaxActiveLights; i++) {
         rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i, TRUE);
         ok(rc == D3D_OK, "Enabling light %u failed with %x\n", i, rc);
-- 
1.5.3.6


--=-18o+DNsWf4MEUh0q/y4H--




More information about the wine-patches mailing list