diff --git a/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt b/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt index 60b442368d8..ec30fa48599 100644 --- a/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt +++ b/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt @@ -1,5 +1,5 @@ -add_definitions(-D__WINESRC__) +add_definitions(-D__WINESRC__ -Dcopysignf=_copysignf) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(d3dx9_36.dll d3dx9_36.spec ADD_IMPORTLIB) diff --git a/reactos/dll/directx/wine/d3dx9_36/math.c b/reactos/dll/directx/wine/d3dx9_36/math.c index 2229cb4f849..910e4f9377d 100644 --- a/reactos/dll/directx/wine/d3dx9_36/math.c +++ b/reactos/dll/directx/wine/d3dx9_36/math.c @@ -2118,7 +2118,7 @@ unsigned short float_32_to_16(const float in) { int exp = 0, origexp; float tmp = fabsf(in); - int sign = (in < 0); + int sign = (copysignf(1, in) < 0); unsigned int mantissa; unsigned short ret; diff --git a/reactos/dll/directx/wine/wined3d/CMakeLists.txt b/reactos/dll/directx/wine/wined3d/CMakeLists.txt index d1192c7781b..d0527b2bd5a 100644 --- a/reactos/dll/directx/wine/wined3d/CMakeLists.txt +++ b/reactos/dll/directx/wine/wined3d/CMakeLists.txt @@ -2,7 +2,8 @@ add_definitions( -D__WINESRC__ -D_USE_MATH_DEFINES - -DUSE_WIN32_OPENGL) + -DUSE_WIN32_OPENGL + -Dcopysignf=_copysignf) include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine) diff --git a/reactos/dll/directx/wine/wined3d/utils.c b/reactos/dll/directx/wine/wined3d/utils.c index e7b56ce5237..721548524e3 100644 --- a/reactos/dll/directx/wine/wined3d/utils.c +++ b/reactos/dll/directx/wine/wined3d/utils.c @@ -3987,7 +3987,7 @@ void wined3d_ftoa(float value, char *s) { int idx = 1; - if (value < 0.0f) + if (copysignf(1.0f, value) < 0.0f) ++idx; /* Be sure to allocate a buffer of at least 17 characters for the result