From f20c637dd69587211f78d3aefe723b01b19e2022 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 30 May 2021 16:04:37 -0300 Subject: [PATCH] iOS: Fix simulator build --- src/modules/image/magpie/STBHandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/image/magpie/STBHandler.cpp b/src/modules/image/magpie/STBHandler.cpp index 5dce9850f..9f2b8372d 100644 --- a/src/modules/image/magpie/STBHandler.cpp +++ b/src/modules/image/magpie/STBHandler.cpp @@ -29,6 +29,12 @@ static void loveSTBIAssert(bool test, const char *teststr) throw love::Exception("Could not decode image (stb_image assertion '%s' failed)", teststr); } +// Workaround when building for iOS Simulator with deployment target=8.0 +#include "common/config.h" +#if defined(LOVE_IOS) && defined(TARGET_OS_SIMULATOR) +#define STBI_NO_THREAD_LOCALS +#endif + // stb_image #define STBI_ONLY_JPEG // #define STBI_ONLY_PNG