The ddraw tests don't compile with Visual C++ 2005.

Marcus Meissner marcus at jet.franken.de
Sun May 27 07:31:55 CDT 2007


On Sun, May 27, 2007 at 01:17:23PM +0200, Francois Gouget wrote:
> 
> Visual C++ 2005 does not like the way we compute the infinity and NaN 
> values. I've tried replacing the current divisions by zero with 
> arithmetic on FLT_MAX (at least for the infinity calculations), but it 
> did not like that either.
> 
> Does anyone know how to make these calculations portable?
> How does one get at these values on Windows?
> 
> 
> diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
> [...]
>      light.dvAttenuation0 = -1.0 / 0.0; /* -INFINITY */
> [...]
>      light.dvAttenuation0 = 1.0 / 0.0; /* +INFINITY */
> [...]
>      light.dvAttenuation0 = 0.0 / 0.0; /* NaN */

Why doesn't the code try using the INFINITY and NAN #defines?
Would this help with Visual C++?

Ciao, Marcus



More information about the wine-devel mailing list