From 13a7a073c0e520620c6733b3fb725d190822c4d0 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 27 Nov 2025 19:36:51 +0100 Subject: Mask FPU exceptions that are redefined by Gtk+ https://wiki.freepascal.org/SetExceptionMask --- libgtk_kylix/GTKForms.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgtk_kylix/GTKForms.pas b/libgtk_kylix/GTKForms.pas index 3b159de..7c01b58 100644 --- a/libgtk_kylix/GTKForms.pas +++ b/libgtk_kylix/GTKForms.pas @@ -218,6 +218,8 @@ function GetParentForm(Control: TGTKControl): TCustomGTKForm; (********************************************************************************************************************************) implementation +uses Math; + constructor TGDKScreen.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -837,6 +839,9 @@ begin end; initialization + // Mask FPU exceptions that are redefined by Gtk+ + // https://wiki.freepascal.org/SetExceptionMask + SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]); Screen := TGDKScreen.Create(nil); Application := TGTKApplication.Create(Screen); finalization -- cgit v1.2.3