소스 검색

Fix crash on 32/64-bits Linux with the 2.8.3.3 SDK

rdb 15 년 전
부모
커밋
95b8f46895
2개의 변경된 파일11개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 2
      panda/src/physx/Sources.pp
  2. 9 3
      panda/src/physx/physx_includes.h

+ 2 - 2
panda/src/physx/Sources.pp

@@ -11,7 +11,7 @@
   #define COMBINED_SOURCES $[TARGET]_composite.cxx
 
   #define SOURCES \
-    config_physx.h \
+    config_physx.h physx_includes.h \
     physxActor.I physxActor.h \
     physxActorDesc.I physxActorDesc.h \
     physxBodyDesc.I physxBodyDesc.h \
@@ -265,7 +265,7 @@
     physxWheelShapeDesc.cxx \
 
   #define INSTALL_HEADERS \
-    config_physx.h \
+    config_physx.h physx_includes.h \
     physxActor.I physxActor.h \
     physxActorDesc.I physxActorDesc.h \
     physxBodyDesc.I physxBodyDesc.h \

+ 9 - 3
panda/src/physx/physx_includes.h

@@ -15,21 +15,27 @@
 #ifndef PHYSX_INCLUDES_H
 #define PHYSX_INCLUDES_H
 
+// This one is safe to include
+#include "NxVersionNumber.h"
 
 // Platform-specific defines
 #if NATIVE_WORDSIZE == 64
-#define NX64
+#define NX64 1
 #endif
 
 #if NATIVE_WORDSIZE == 32
-#define NX32
+#define NX32 1
 #endif
 
 #ifdef IS_LINUX
 #define LINUX 1
 #define CORELIB 1
-#define NX_DISABLE_FLUIDS 1
 #define NX_DISABLE_HARDWARE 1
+#if NX_SDK_VERSION_NUMBER <= 281
+// Defining this in 2.8.3.3 yields a crash.
+#error NX_SDK_VERSION_NUMBER
+#define NX_DISABLE_FLUIDS 1
+#endif
 #endif