Skip to content

Commit

Permalink
vhacd: Patch to fix UWP ARM build
Browse files Browse the repository at this point in the history
This is a very outdated copy of Bullet's btScalar.h,
we're probably only discovering the tip of the bad
cross-platform compatibility of the unmaintained vhacd.
  • Loading branch information
akien-mga committed Dec 13, 2019
1 parent 9432520 commit 19252d4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions thirdparty/vhacd/0004-fix-uwp-arm-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/thirdparty/vhacd/inc/btScalar.h b/thirdparty/vhacd/inc/btScalar.h
index 3999a71521..4c9e0cf7ab 100644
--- a/thirdparty/vhacd/inc/btScalar.h
+++ b/thirdparty/vhacd/inc/btScalar.h
@@ -72,7 +72,10 @@ inline int32_t btGetVersion()
#define btFsel(a, b, c) __fsel((a), (b), (c))
#else

-#if (defined(_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined(BT_USE_DOUBLE_PRECISION))
+// -- GODOT start --
+//#if (defined(_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined(BT_USE_DOUBLE_PRECISION))
+#if (defined(_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined(BT_USE_DOUBLE_PRECISION)) && (!defined(_M_ARM))
+// -- GODOT end --
#define BT_USE_SSE
#include <emmintrin.h>
#endif
5 changes: 4 additions & 1 deletion thirdparty/vhacd/inc/btScalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ inline int32_t btGetVersion()
#define btFsel(a, b, c) __fsel((a), (b), (c))
#else

#if (defined(_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined(BT_USE_DOUBLE_PRECISION))
// -- GODOT start --
//#if (defined(_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined(BT_USE_DOUBLE_PRECISION))
#if (defined(_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined(BT_USE_DOUBLE_PRECISION)) && (!defined(_M_ARM))
// -- GODOT end --
#define BT_USE_SSE
#include <emmintrin.h>
#endif
Expand Down

0 comments on commit 19252d4

Please sign in to comment.