Quasar
Moderator

Posts: 5140
Registered: 08-00 |
If EE is compiled using GCC 4.2.1.20070719 on platform i386-unknown-openbsd, the following check fails:
code:
if(vbscreen.getVirtualAspectRatio() <= 4.0/3.0)
return;
With the exception of modes 320x200 and 640x400, which are treated specially, the function in question basically does this:
code:
return static_cast<double>(width) / height;
Regardless of the input screen dimensions, if the aspect ratio is 4/3, such as in modes 640x480 or 1024x768, the comparison always fails, leading to a frequent crash and other side effects.
I have to believe this isn't just floating point inaccuracy, because the value in question 4/3 is, in ideal real math, 1.3333... - this should not be getting rounded UP at all, rather if anything I'd expect the binary float truncation to have a value less than real 4/3. Either the folded constant value in the EXE is less than 4/3 and the function is accurate, or the constant is correct and the function returns a value > 4/3.
Anybody else ever ran into this?
Last edited by Quasar on 08-29-12 at 03:10
|