d3d9/tests: Fix compilation with Visual C++ 2005.

Francois Gouget fgouget at free.fr
Sun May 27 06:25:46 CDT 2007


---

Visual C++ 2005 did not like the way we initialize the union.

 dlls/d3d9/tests/visual.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 0d7f35f..29d963f 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -693,8 +693,10 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
 {
     HRESULT hr;
     DWORD color;
-    /* NOTE: changing these values will not effect the tests with foggy vertex shader, as the values are hardcoded in the shader*/
-    union {float f; DWORD i;} start={.f=0.9}, end={.f=0.1};
+    union {
+        float f;
+        DWORD i;
+    } start, end;
     unsigned int i, j;
 
     /* basic vertex shader without fog computation ("non foggy") */
@@ -828,6 +830,10 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
 
     };
 
+    /* NOTE: changing these values will not affect the tests with foggy vertex shader, as the values are hardcoded in the shader*/
+    start.f=0.9;
+    end.f=0.1;
+
     hr = IDirect3DDevice9_CreateVertexShader(device, vertex_shader_code1, &vertex_shader[1]);
     ok(SUCCEEDED(hr), "CreateVertexShader failed (%08x)\n", hr);
     hr = IDirect3DDevice9_CreateVertexShader(device, vertex_shader_code2, &vertex_shader[2]);
-- 
1.4.4.4




More information about the wine-patches mailing list