d3d9/tests: Fix compilation on systems that don't support nameless unions.

This commit is contained in:
Francois Gouget 2008-03-10 14:14:53 +01:00 committed by Alexandre Julliard
parent ef5a4a447c
commit 8ffad44397

View file

@ -7053,15 +7053,15 @@ static void pointsize_test(IDirect3DDevice9 *device)
};
/* Transforms the coordinate system [-1.0;1.0]x[-1.0;1.0] to [0.0;0.0]x[640.0;480.0]. Z is untouched */
matrix.m[0][0] = 2.0/640.0; matrix.m[1][0] = 0.0; matrix.m[2][0] = 0.0; matrix.m[3][0] =-1.0;
matrix.m[0][1] = 0.0; matrix.m[1][1] =-2.0/480.0; matrix.m[2][1] = 0.0; matrix.m[3][1] = 1.0;
matrix.m[0][2] = 0.0; matrix.m[1][2] = 0.0; matrix.m[2][2] = 1.0; matrix.m[3][2] = 0.0;
matrix.m[0][3] = 0.0; matrix.m[1][3] = 0.0; matrix.m[2][3] = 0.0; matrix.m[3][3] = 1.0;
U(matrix).m[0][0] = 2.0/640.0; U(matrix).m[1][0] = 0.0; U(matrix).m[2][0] = 0.0; U(matrix).m[3][0] =-1.0;
U(matrix).m[0][1] = 0.0; U(matrix).m[1][1] =-2.0/480.0; U(matrix).m[2][1] = 0.0; U(matrix).m[3][1] = 1.0;
U(matrix).m[0][2] = 0.0; U(matrix).m[1][2] = 0.0; U(matrix).m[2][2] = 1.0; U(matrix).m[3][2] = 0.0;
U(matrix).m[0][3] = 0.0; U(matrix).m[1][3] = 0.0; U(matrix).m[2][3] = 0.0; U(matrix).m[3][3] = 1.0;
identity.m[0][0] = 1.0; identity.m[1][0] = 0.0; identity.m[2][0] = 0.0; identity.m[3][0] = 0.0;
identity.m[0][1] = 0.0; identity.m[1][1] = 1.0; identity.m[2][1] = 0.0; identity.m[3][1] = 0.0;
identity.m[0][2] = 0.0; identity.m[1][2] = 0.0; identity.m[2][2] = 1.0; identity.m[3][2] = 0.0;
identity.m[0][3] = 0.0; identity.m[1][3] = 0.0; identity.m[2][3] = 0.0; identity.m[3][3] = 1.0;
U(identity).m[0][0] = 1.0; U(identity).m[1][0] = 0.0; U(identity).m[2][0] = 0.0; U(identity).m[3][0] = 0.0;
U(identity).m[0][1] = 0.0; U(identity).m[1][1] = 1.0; U(identity).m[2][1] = 0.0; U(identity).m[3][1] = 0.0;
U(identity).m[0][2] = 0.0; U(identity).m[1][2] = 0.0; U(identity).m[2][2] = 1.0; U(identity).m[3][2] = 0.0;
U(identity).m[0][3] = 0.0; U(identity).m[1][3] = 0.0; U(identity).m[2][3] = 0.0; U(identity).m[3][3] = 1.0;
memset(&caps, 0, sizeof(caps));
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);