Detlef Riekenberg : ddraw/tests: Avoid endless loop, when T&L is not supported.
Module: wine Branch: master Commit: 1eb52667ac16c56a220171472a2ea09c7306d436 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1eb52667ac16c56a220171472a... Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Tue Feb 19 20:21:12 2008 +0100 ddraw/tests: Avoid endless loop, when T&L is not supported. --- 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);
participants (1)
-
Alexandre Julliard