瀏覽代碼

stb_image: fix building by MSVC for Windows 10 on ARM

Eugene Golushkov 5 年之前
父節點
當前提交
69a7dd32a8
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      stb_image.h

+ 4 - 1
stb_image.h

@@ -777,9 +777,12 @@ static int stbi__sse2_available(void)
 
 #ifdef STBI_NEON
 #include <arm_neon.h>
-// assume GCC or Clang on ARM targets
+#ifdef _MSC_VER
+#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name
+#else
 #define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16)))
 #endif
+#endif
 
 #ifndef STBI_SIMD_ALIGN
 #define STBI_SIMD_ALIGN(type, name) type name