From a63e93a193ac9e5e677b1278ac8c1df0fc5501bd Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 13 Nov 2019 15:46:58 -0800 Subject: [PATCH] Supported Android and Apple hardware has ARM SIMD capability --- src/cpuinfo/SDL_cpuinfo.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c index 8412b52de..2916e34e9 100644 --- a/src/cpuinfo/SDL_cpuinfo.c +++ b/src/cpuinfo/SDL_cpuinfo.c @@ -334,16 +334,20 @@ CPU_haveAltiVec(void) } #if !defined(__ARM_ARCH) -static SDL_bool CPU_haveARMSIMD(void) { return 0; } +static int +CPU_haveARMSIMD(void) +{ + return 0; +} -#elif defined(__linux__) +#elif defined(__LINUX__) #include #include #include #include #include -static SDL_bool +static int CPU_haveARMSIMD(void) { int arm_simd = 0; @@ -368,11 +372,13 @@ CPU_haveARMSIMD(void) } #else -static SDL_bool +static int CPU_haveARMSIMD(void) { - #warning SDL_HasARMSIMD is not implemented for this ARM platform. Write me. - return 0; +#if !defined(__ANDROID__) && !defined(__IPHONEOS__) && !defined(__TVOS__) +#warning SDL_HasARMSIMD is not implemented for this ARM platform, defaulting to TRUE +#endif + return 1; } #endif