d3dx9: Check for missing log2 function.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-05-17 20:20:09 +02:00
parent 2e9ca4626e
commit d321cdcd28
1 changed files with 4 additions and 0 deletions

View File

@ -104,7 +104,11 @@ static double pres_log(double *args, int n)
if (v == 0.0)
return 0.0;
else
#ifdef HAVE_LOG2
return log2(v);
#else
return log(v) / log(2);
#endif
}
#define PRES_OPCODE_MASK 0x7ff00000