diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-04-22 16:24:39 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-04-22 16:24:39 +0000 |
commit | 7be51db0f1853f2a9c4c403f4552826a3dcc8544 (patch) | |
tree | 51ca4af82a4c0e13061eb73b8275357cfbda82c3 /Game/Code/Classes/UMain.pas | |
parent | 0bf82c1d17814e6190033e79984801846be27b6c (diff) | |
download | usdx-7be51db0f1853f2a9c4c403f4552826a3dcc8544.tar.gz usdx-7be51db0f1853f2a9c4c403f4552826a3dcc8544.tar.xz usdx-7be51db0f1853f2a9c4c403f4552826a3dcc8544.zip |
SSE floating-point-exception (FPE) fix. Occured when playing ogg-files or with projectM. See UCommon.pas for more information.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1034 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UMain.pas')
-rw-r--r-- | Game/Code/Classes/UMain.pas | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index fef2ff31..2e49ac8d 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -131,6 +131,7 @@ uses UParty, UConfig, UCore, + UCommon, UGraphicClasses, UPluginDefs, UPlatform; @@ -148,6 +149,11 @@ begin if Platform.TerminateIfAlreadyRunning( {var} WndTitle) then Exit; + // fix floating-point exceptions (FPE) + DisableFloatingPointExceptions(); + // fix the locale for string-to-float parsing in C-libs + SetDefaultNumericLocale(); + //------------------------------ //StartUp - Create Classes and Load Files //------------------------------ @@ -177,7 +183,7 @@ begin // SDL Log.BenchmarkStart(1); Log.LogStatus('Initialize SDL', 'Initialization'); - SDL_Init(SDL_INIT_VIDEO); + SDL_Init(SDL_INIT_VIDEO or SDL_INIT_TIMER); Log.BenchmarkEnd(1); Log.LogBenchmark('Initializing SDL', 1); |