diff --git a/reactos/dll/directx/wine/CMakeLists.txt b/reactos/dll/directx/wine/CMakeLists.txt index 8839aa496c8..f0e665bc097 100644 --- a/reactos/dll/directx/wine/CMakeLists.txt +++ b/reactos/dll/directx/wine/CMakeLists.txt @@ -23,6 +23,4 @@ add_subdirectory(d3dx9_40) add_subdirectory(d3dx9_41) add_subdirectory(d3dx9_42) add_subdirectory(ddraw) -if(NOT MSVC) - add_subdirectory(wined3d) -endif() +add_subdirectory(wined3d) diff --git a/reactos/dll/directx/wine/wined3d/state.c b/reactos/dll/directx/wine/wined3d/state.c index 6c92e6ea1ab..9465989ee2d 100644 --- a/reactos/dll/directx/wine/wined3d/state.c +++ b/reactos/dll/directx/wine/wined3d/state.c @@ -1042,7 +1042,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/reactos/dll/directx/wine/wined3d/wined3d_private.h b/reactos/dll/directx/wine/wined3d/wined3d_private.h index c9d12085e9c..3070ae3e9e7 100644 --- a/reactos/dll/directx/wine/wined3d/wined3d_private.h +++ b/reactos/dll/directx/wine/wined3d/wined3d_private.h @@ -199,8 +199,8 @@ 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 */ - else return 0.0f / 0.0f; /* NAN */ + if(m == 0) return sgn * INFINITY; /* +INF / -INF */ + else return NAN; /* NAN */ } } @@ -221,8 +221,8 @@ 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 */ + if (m == 0) return sgn * INFINITY; /* +INF / -INF */ + else return NAN; /* NAN */ } }