From 1a16f5c72896d243cac33147e8ca28079b882ecf Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 20 Mar 2008 00:54:21 +0000 Subject: - Delphi (in contrast to C/C++) handles floating-point multiplications with NaN or divisions by 0.0 as floating-point exceptions (FPE). This is a problem with some libraries which expect that e.g. "NaN * 3.0" is NaN or "4.0 / 0" is INFINITY. - The (strange) default behavior can be changed by setting the control word of the FPU. This is done by assigning $133F to this register via Set8087CW() in delphi. In FPC it was not available for a long time but now it is. OpenGL12.pas contained an own version of Set8087CW() which was totally wrong because the important asm-directives (fclex and fldcw) were missing so it was not of any use. Hence it was removed from the unit so it does not hide the correct FPC version anymore. - This should fix some EDivByZero exceptions in floating-point expressions (as with projectM). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@962 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/JEDI-SDL/OpenGL/Pas/gl.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Game/Code/lib/JEDI-SDL/OpenGL/Pas/gl.pas') diff --git a/Game/Code/lib/JEDI-SDL/OpenGL/Pas/gl.pas b/Game/Code/lib/JEDI-SDL/OpenGL/Pas/gl.pas index d2bdcf8b..5c5ec0da 100644 --- a/Game/Code/lib/JEDI-SDL/OpenGL/Pas/gl.pas +++ b/Game/Code/lib/JEDI-SDL/OpenGL/Pas/gl.pas @@ -2287,9 +2287,9 @@ begin end; initialization - {$ifdef x86} + {$IF Defined(CPU386) or Defined(CPUI386) or Defined(CPUX86_64)} Set8087CW($133F); - {$endif x86} + {$IFEND} LoadOpenGL( GLLibName ); -- cgit v1.2.3