Browse Source

iOS: Fix simulator build

Alex Szpakowski 4 years ago
parent
commit
f20c637dd6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/modules/image/magpie/STBHandler.cpp

+ 6 - 0
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);
 		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
 // stb_image
  #define STBI_ONLY_JPEG
  #define STBI_ONLY_JPEG
 // #define STBI_ONLY_PNG
 // #define STBI_ONLY_PNG