From 802e2ac7c2236dce547d41ecec1ef7c6515b34ad Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 28 Oct 2025 21:25:30 +0100 Subject: [PATCH] Fix compiling `stb` texture tool on Windows --- Source/Engine/Tools/TextureTool/TextureTool.stb.cpp | 2 ++ Source/ThirdParty/detex/detex.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Source/Engine/Tools/TextureTool/TextureTool.stb.cpp b/Source/Engine/Tools/TextureTool/TextureTool.stb.cpp index b88bc4ef3..7c74ef3f2 100644 --- a/Source/Engine/Tools/TextureTool/TextureTool.stb.cpp +++ b/Source/Engine/Tools/TextureTool/TextureTool.stb.cpp @@ -65,6 +65,8 @@ #endif +#undef MessageBox + static void stbWrite(void* context, void* data, int size) { auto file = (FileWriteStream*)context; diff --git a/Source/ThirdParty/detex/detex.h b/Source/ThirdParty/detex/detex.h index adbeac512..ec61d7495 100644 --- a/Source/ThirdParty/detex/detex.h +++ b/Source/ThirdParty/detex/detex.h @@ -72,7 +72,11 @@ __BEGIN_DECLS #include #include +#if defined(_MSC_VER) +#define DETEX_INLINE_ONLY __forceinline +#else #define DETEX_INLINE_ONLY __attribute__((always_inline)) inline +#endif #define DETEX_RESTRICT __restrict /* Maximum uncompressed block size in bytes. */