add App_SharedMemoryPhysics and App_SharedMemoryPhysics_GUI to cmake

fix 'connection' detection for shared memory (due to multiple shmem blocks)
add link to pybullet.so
This commit is contained in:
Erwin Coumans
2017-01-16 11:17:32 -08:00
parent 8e9181f85c
commit 3d985ff7a5
5 changed files with 219 additions and 7 deletions

View File

@@ -128,18 +128,16 @@ bool PhysicsServerSharedMemory::connectSharedMemory( struct GUIHelperInterface*
bool allowCreation = true;
bool allConnected = false;
int numConnected = 0;
int counter = 0;
for (int block=0;block<MAX_SHARED_MEMORY_BLOCKS;block++)
{
if (m_data->m_areConnected[block])
{
allConnected = true;
numConnected++;
b3Warning("connectSharedMemory, while already connected");
continue;
}
@@ -163,6 +161,7 @@ bool PhysicsServerSharedMemory::connectSharedMemory( struct GUIHelperInterface*
b3Printf("Created and initialized shared memory block\n");
}
m_data->m_areConnected[block] = true;
numConnected++;
} else
{
m_data->m_sharedMemory->releaseSharedMemory(m_data->m_sharedMemoryKey+block, SHARED_MEMORY_SIZE);
@@ -181,6 +180,8 @@ bool PhysicsServerSharedMemory::connectSharedMemory( struct GUIHelperInterface*
}
}
allConnected = (numConnected==MAX_SHARED_MEMORY_BLOCKS);
return allConnected;
}