From 1a93983bd4baed5a7e1a6ac522236c16509027c3 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 30 May 2012 16:14:56 +0200 Subject: [PATCH] wined3d: Use NAN. --- dlls/wined3d/drawprim.c | 2 ++ dlls/wined3d/utils.c | 2 ++ dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 2e30175456c..c8944e53daf 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -25,6 +25,8 @@ */ #include "config.h" +#include "wine/port.h" + #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw); diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index dc63d8b929a..f8f301aad58 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -25,6 +25,8 @@ */ #include "config.h" +#include "wine/port.h" + #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 096fe60058f..6632f6e9d1a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -200,7 +200,7 @@ static inline float float_16_to_32(const unsigned short *in) { return sgn * powf(2, (float)e - 15.0f) * (1.0f + ((float)m / 1024.0f)); } else { if(m == 0) return sgn / 0.0f; /* +INF / -INF */ - else return 0.0f / 0.0f; /* NAN */ + else return NAN; } } @@ -222,7 +222,7 @@ static inline float float_24_to_32(DWORD in) else { if (m == 0) return sgn / 0.0f; /* +INF / -INF */ - else return 0.0f / 0.0f; /* NAN */ + else return NAN; } } -- 2.11.4.GIT