[D3DX9_36/WINED3D]

Partly revert previous changes, bringing back copysignf. Add global defines copysignf=_copysignf, since we have that now.

svn path=/trunk/; revision=67723
This commit is contained in:
Timo Kreuzer 2015-05-14 20:45:56 +00:00
parent b2135ede32
commit 12ac6dabfb
4 changed files with 5 additions and 4 deletions

View file

@ -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)

View file

@ -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;

View file

@ -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)

View file

@ -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