Ver Fonte

tweak HAVE_IMMINTRIN_H in SDL_config_windows.h, add to SDL_config_macosx.h

Ozkan Sezer há 3 anos atrás
pai
commit
e16fb60323
2 ficheiros alterados com 11 adições e 1 exclusões
  1. 6 0
      include/SDL_config_macosx.h
  2. 5 1
      include/SDL_config_windows.h

+ 6 - 0
include/SDL_config_macosx.h

@@ -137,6 +137,12 @@
 #define HAVE_SYSCONF    1
 #define HAVE_SYSCTLBYNAME 1
 
+#if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
+# if __has_include(<immintrin.h>)
+#   define HAVE_IMMINTRIN_H 1
+# endif
+#endif
+
 #define HAVE_GCC_ATOMICS 1
 
 /* Enable various audio drivers */

+ 5 - 1
include/SDL_config_windows.h

@@ -85,8 +85,12 @@ typedef unsigned int uintptr_t;
 #define HAVE_MMDEVICEAPI_H 1
 #define HAVE_AUDIOCLIENT_H 1
 #define HAVE_SENSORSAPI_H 1
-#if defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)
+#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
 #define HAVE_IMMINTRIN_H 1
+#elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
+# if __has_include(<immintrin.h>)
+#   define HAVE_IMMINTRIN_H 1
+# endif
 #endif
 
 /* This is disabled by default to avoid C runtime dependencies and manifest requirements */