diff --git a/panda/src/physx/Sources.pp b/panda/src/physx/Sources.pp index be3d7bc47b..bf1a23401d 100644 --- a/panda/src/physx/Sources.pp +++ b/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 \ diff --git a/panda/src/physx/physx_includes.h b/panda/src/physx/physx_includes.h index 5285a07227..4d94010da7 100644 --- a/panda/src/physx/physx_includes.h +++ b/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