Skip to content

Commit 8719789

Browse files
committed
Fix bullet memory pools to work on N64 without expansion pak
1 parent df20779 commit 8719789

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ int main(void)
173173
data_cache_hit_writeback(&viewport, sizeof(viewport));
174174

175175
/* Initalize bullet physics stuff */
176-
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
176+
// We need to lower the default memory heap sizes to fix within the N64 memory limitations
177+
btDefaultCollisionConstructionInfo constructionInfo = btDefaultCollisionConstructionInfo();
178+
constructionInfo.m_defaultMaxCollisionAlgorithmPoolSize = 512;
179+
constructionInfo.m_defaultMaxPersistentManifoldPoolSize = 512;
180+
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration(constructionInfo);
177181
btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
178182
btBroadphaseInterface* overlappingPairCache = new btDbvtBroadphase();
179183
btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver;

0 commit comments

Comments
 (0)