From bb859133a8813b651a4c352d6dd7c86e9cdccec4 Mon Sep 17 00:00:00 2001 From: tobigun Date: Mon, 20 Oct 2008 21:46:57 +0000 Subject: Do not use Main try-except block if in debug mode to make debugging easier git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1465 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UMain.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/base/UMain.pas b/src/base/UMain.pas index f9ac4ebe..6e6d2ad7 100644 --- a/src/base/UMain.pas +++ b/src/base/UMain.pas @@ -171,14 +171,16 @@ procedure Main; var WndTitle: string; begin + {$IFNDEF Debug} try + {$ENDIF} WndTitle := USDXVersionStr; Platform.Init; if Platform.TerminateIfAlreadyRunning(WndTitle) then Exit; - + // fix floating-point exceptions (FPE) DisableFloatingPointExceptions(); // fix the locale for string-to-float parsing in C-libs @@ -380,7 +382,9 @@ begin Log.LogStatus('Main Loop', 'Initialization'); MainLoop; + {$IFNDEF Debug} finally + {$ENDIF} //------------------------------ //Finish Application //------------------------------ @@ -399,7 +403,9 @@ begin Log.LogStatus('Main Loop', 'Finished'); Log.Free; end; + {$IFNDEF Debug} end; + {$ENDIF} end; procedure MainLoop; -- cgit v1.2.3