From e16fb60323f96085982dc033b7d4544d99ba3bc6 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 27 Jul 2021 17:10:24 +0300 Subject: [PATCH] tweak HAVE_IMMINTRIN_H in SDL_config_windows.h, add to SDL_config_macosx.h --- include/SDL_config_macosx.h | 6 ++++++ include/SDL_config_windows.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h index 9a8f720fa..ec1886623 100644 --- a/include/SDL_config_macosx.h +++ b/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() +# define HAVE_IMMINTRIN_H 1 +# endif +#endif + #define HAVE_GCC_ATOMICS 1 /* Enable various audio drivers */ diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h index ec7f3f2d7..33436c41c 100644 --- a/include/SDL_config_windows.h +++ b/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() +# define HAVE_IMMINTRIN_H 1 +# endif #endif /* This is disabled by default to avoid C runtime dependencies and manifest requirements */