[PATCH] ddraw/tests: Avoid endless loop, when T&L is not supported
Detlef Riekenberg
wine.dev at web.de
Sun Feb 17 05:46:22 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 fb9e51e..c912126 100644
--- a/dlls/ddraw/tests/d3d.c
+++ b/dlls/ddraw/tests/d3d.c
@@ -351,6 +351,12 @@ static void LightTest(void)
rc = IDirect3DDevice7_GetCaps(lpD3DDevice, &caps);
ok(rc == D3D_OK, "IDirect3DDevice7_GetCaps failed with %x\n", rc);
+ if ( ((LONG) caps.dwMaxActiveLights) < 1 ) {
+ /* cards without T&L return -1 here. (Example: Vodoo banshee) */
+ skip("dwMaxActiveLights out of range (T&L not supported): %d\n", caps.dwMaxActiveLights);
+ 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
--=-+5ZGO85rZ1ISgtWmhuuM--
More information about the wine-patches
mailing list