add command-line argument for example browser and shared memory app, --shared_memory_key=<int>
fix some shared memory issues, client uses attach/detach, server uses create/remove shared memory implement CMD_RESET_SIMULATION
This commit is contained in:
@@ -25,6 +25,7 @@ subject to the following restrictions:
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int gSharedMemoryKey = -1;
|
||||
|
||||
static SharedMemoryCommon* example = NULL;
|
||||
static bool interrupted = false;
|
||||
@@ -70,6 +71,8 @@ int main(int argc, char* argv[])
|
||||
|
||||
CommonExampleOptions options(&noGfx);
|
||||
|
||||
args.GetCmdLineArgument("shared_memory_key", gSharedMemoryKey);
|
||||
|
||||
if (args.CheckCmdLineFlag("client"))
|
||||
{
|
||||
example = (SharedMemoryCommon*)PhysicsClientCreateFunc(options);
|
||||
@@ -78,6 +81,7 @@ int main(int argc, char* argv[])
|
||||
example = (SharedMemoryCommon*)PhysicsServerCreateFunc(options);
|
||||
}
|
||||
|
||||
|
||||
example->initPhysics();
|
||||
while (example->isConnected() && !(example->wantsTermination() || interrupted))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user