From 1eb52667ac16c56a220171472a2ea09c7306d436 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Tue, 19 Feb 2008 20:21:12 +0100 Subject: [PATCH] ddraw/tests: Avoid endless loop, when T&L is not supported. --- dlls/ddraw/tests/d3d.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index e51f4764026..678b1f0f196 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); -- 2.11.4.GIT