Skip to content

Commit

Permalink
ensure floating point denormals aren't used, they can massively lag t…
Browse files Browse the repository at this point in the history
…he air sim
  • Loading branch information
jacob1 committed Feb 20, 2017
1 parent 08a7dfe commit ac8c01a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/PowderToySDL.cpp
Expand Up @@ -8,6 +8,8 @@
#include <direct.h>
#endif
#include "SDLCompat.h"
#include <xmmintrin.h>
#include <pmmintrin.h>
#include <iostream>
#include <sstream>
#include <string>
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ac8c01a

Please sign in to comment.