Module: wine Branch: master Commit: a6510b3fbcfd35644f39ee02637392805f0b60dd URL: http://source.winehq.org/git/wine.git/?a=commit;h=a6510b3fbcfd35644f39ee0263...
Author: Thomas Faber thfabba@gmx.de Date: Sun Jun 17 16:07:30 2012 +0200
wined3d: Use INFINITY.
---
dlls/wined3d/state.c | 2 +- dlls/wined3d/wined3d_private.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 35e1736..b3d5fa3 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1049,7 +1049,7 @@ void state_fogstartend(struct wined3d_context *context, const struct wined3d_sta fogend = tmpvalue.f; /* In GL, fogstart == fogend disables fog, in D3D everything's fogged.*/ if(fogstart == fogend) { - fogstart = -1.0f / 0.0f; + fogstart = -INFINITY; fogend = 0.0f; } break; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 4b5176d..9aa4be3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -199,7 +199,7 @@ static inline float float_16_to_32(const unsigned short *in) { } else if(e < 31) { return sgn * powf(2, (float)e - 15.0f) * (1.0f + ((float)m / 1024.0f)); } else { - if(m == 0) return sgn / 0.0f; /* +INF / -INF */ + if(m == 0) return sgn * INFINITY; else return NAN; } } @@ -221,7 +221,7 @@ static inline float float_24_to_32(DWORD in) } else { - if (m == 0) return sgn / 0.0f; /* +INF / -INF */ + if (m == 0) return sgn * INFINITY; else return NAN; } }