summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2025-11-27 19:36:51 +0100
committerTomas Bzatek <tbzatek@redhat.com>2025-11-27 21:43:01 +0100
commit13a7a073c0e520620c6733b3fb725d190822c4d0 (patch)
treed5d871f210e1f962feae302d14d5ec3af3306f58
parent36a656e6188f227956dbdf12bf5fda8be1ea7985 (diff)
downloadtuxcmd-13a7a073c0e520620c6733b3fb725d190822c4d0.tar.xz
Mask FPU exceptions that are redefined by Gtk+
https://wiki.freepascal.org/SetExceptionMask
-rw-r--r--libgtk_kylix/GTKForms.pas5
1 files changed, 5 insertions, 0 deletions
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