mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-03 16:36:26 +00:00
fix(rtextures): TCC not being able to compile due to: 'emmintrin.h' not found (#4707)
define STBIR_NO_SIMD when __TINYC__ is defined so stb_image_resize2 will not include *mmintrin which are not supported by all compilers. There are similar checks for __TINYC__ already elswere in raylib and they are also mostly there to disable SIMD headers. Additionally, move similar check for stb_image, to be a little bit deeper. Before it was defining STBI_NO_SIMD without including stb_image It was also clashing with note, causing said note to make no sense. Fixes: https://github.com/raysan5/raylib/discussions/2994 Reference: https://github.com/nothings/stb/issues/1738
This commit is contained in:
@@ -124,10 +124,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Image fileformats not supported by default
|
// Image fileformats not supported by default
|
||||||
#if defined(__TINYC__)
|
|
||||||
#define STBI_NO_SIMD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (defined(SUPPORT_FILEFORMAT_BMP) || \
|
#if (defined(SUPPORT_FILEFORMAT_BMP) || \
|
||||||
defined(SUPPORT_FILEFORMAT_PNG) || \
|
defined(SUPPORT_FILEFORMAT_PNG) || \
|
||||||
defined(SUPPORT_FILEFORMAT_TGA) || \
|
defined(SUPPORT_FILEFORMAT_TGA) || \
|
||||||
@@ -149,6 +145,10 @@
|
|||||||
|
|
||||||
#define STBI_NO_THREAD_LOCALS
|
#define STBI_NO_THREAD_LOCALS
|
||||||
|
|
||||||
|
#if defined(__TINYC__)
|
||||||
|
#define STBI_NO_SIMD
|
||||||
|
#endif
|
||||||
|
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include "external/stb_image.h" // Required for: stbi_load_from_file()
|
#include "external/stb_image.h" // Required for: stbi_load_from_file()
|
||||||
// NOTE: Used to read image data (multiple formats support)
|
// NOTE: Used to read image data (multiple formats support)
|
||||||
@@ -218,6 +218,9 @@
|
|||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__TINYC__)
|
||||||
|
#define STBIR_NO_SIMD
|
||||||
|
#endif
|
||||||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||||
#include "external/stb_image_resize2.h" // Required for: stbir_resize_uint8_linear() [ImageResize()]
|
#include "external/stb_image_resize2.h" // Required for: stbir_resize_uint8_linear() [ImageResize()]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user