Skip to content

Commit

Permalink
#776 : typo
Browse files Browse the repository at this point in the history
some android stuff
  • Loading branch information
erincatto committed Aug 31, 2024
1 parent 2c4374e commit b511f67
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if(PROJECT_IS_TOP_LEVEL)
include(GNUInstallDirs)

install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include"
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/box2d"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

Expand Down
2 changes: 1 addition & 1 deletion docs/simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ or disable a joint.
You can specify user data for any joint type and you can provide a flag
to prevent the attached bodies from colliding with each other. This is
the default behavior and you must set the `collideConnected`
Boolean to allow collision between to connected bodies.
Boolean to allow collision between two connected bodies.

Many joint definitions require that you provide some geometric data.
Often a joint will be defined by anchor points. These are points fixed
Expand Down
7 changes: 7 additions & 0 deletions src/allocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ void* b2Alloc( uint32_t size )

#ifdef B2_PLATFORM_WINDOWS
void* ptr = _aligned_malloc( size32, B2_ALIGNMENT );
#elif defined(B2_PLATFORM_ANDROID)
void* ptr = NULL;
if (posix_memalign(&ptr, B2_ALIGNMENT, size32) != 0)
{
// allocation failed, exit the application
exit(EXIT_FAILURE);
}
#else
void* ptr = aligned_alloc( B2_ALIGNMENT, size32 );
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
#endif

// Define CPU
#if defined( __x86_64__ ) || defined( _M_X64 )
#define B2_CPU_X64
#elif defined( __aarch64__ ) || defined( _M_ARM64 )
#if defined( __x86_64__ ) || defined( _M_X64 ) || defined( __i386__ ) || defined( _M_IX86 )
#define B2_CPU_X86_X64
#elif defined( __aarch64__ ) || defined( _M_ARM64 ) || defined( __arm__ ) || defined( _M_ARM )
#define B2_CPU_ARM
#elif defined( __EMSCRIPTEN__ )
#define B2_CPU_WASM
Expand All @@ -54,7 +54,7 @@

// Define SIMD
#if defined( BOX2D_ENABLE_SIMD )
#if defined( B2_CPU_X64 )
#if defined( B2_CPU_X86_X64 )
#if defined( BOX2D_AVX2 )
#define B2_SIMD_AVX2
#define B2_SIMD_WIDTH 8
Expand Down Expand Up @@ -96,7 +96,7 @@
} \
while ( 0 )
#elif defined( B2_COMPILER_GCC ) || defined( B2_COMPILER_CLANG )
#if defined( B2_CPU_X64 )
#if defined( B2_CPU_X86_X64 )
#define B2_BREAKPOINT __asm volatile( "int $0x3" )
#elif defined( B2_CPU_ARM )
#define B2_BREAKPOINT __builtin_trap()
Expand Down

0 comments on commit b511f67

Please sign in to comment.