=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3dx9/tests: Fix compilation when the INFINITY macro is not available.
Alexandre Julliard
julliard at winehq.org
Fri Aug 5 16:20:08 CDT 2016
Module: wine
Branch: master
Commit: 61de92735593eb79df8145c31ba84b6127ab1f49
URL: http://source.winehq.org/git/wine.git/?a=commit;h=61de92735593eb79df8145c31ba84b6127ab1f49
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Thu Aug 4 17:52:14 2016 +0200
d3dx9/tests: Fix compilation when the INFINITY macro is not available.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dx9_36/tests/effect.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index 41db494..b3845c5 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -22,6 +22,15 @@
#include "wine/test.h"
#include "d3dx9.h"
+#ifndef INFINITY
+static inline float __port_infinity(void)
+{
+ static const unsigned __inf_bytes = 0x7f800000;
+ return *(const float *)&__inf_bytes;
+}
+#define INFINITY __port_infinity()
+#endif /* INFINITY */
+
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))
/* helper functions */
@@ -4181,7 +4190,7 @@ static void test_preshader_op(IDirect3DDevice9 *device, const DWORD *sample_effe
static void test_effect_preshader_ops(IDirect3DDevice9 *device)
{
- static const struct test_preshader_op_def op_tests[] =
+ const struct test_preshader_op_def op_tests[] =
{
{"exp", 0x10500001, 1, {0x3f800000, 0x3f800000, 0x3e5edc66, 0x7f800000},
{0.0f, -0.0f, -2.2f, 3.402823466e+38f}, {1.0f, 2.0f, -3.0f, 4.0f}},
More information about the wine-cvs
mailing list