From ac8c01ae57d94f55a4d47c40c1f7491666b9e483 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 19 Feb 2017 19:29:41 -0500 Subject: [PATCH] ensure floating point denormals aren't used, they can massively lag the air sim --- src/PowderToySDL.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 23f303840..f9f6b8ce7 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -8,6 +8,8 @@ #include #endif #include "SDLCompat.h" +#include +#include #include #include #include @@ -1082,6 +1084,9 @@ int main(int argc, char * argv[]) signal(SIGABRT, SigHandler); #endif + _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); + _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); + GameController * gameController = NULL; #if !defined(DEBUG) && !defined(_DEBUG) try {