//Check whether the program should quit due to steps being computed, or a timeout
if (ExitCondition())
{
- glutLeaveMainLoop();
+ //printf("Leave graphics loop\n");
+ glutLeaveMainLoop();
return;
}
-
#ifdef SINGLE_THREADED
if (options.verbosity != 0 && universe.steps % options.verbosity == 1)
DisplayStatistics();
System_Compute(&universe);
#endif
-
-
- //Check whether the runstate has been set to quit the program
- switch (runstate)
- {
- case RUN:
- break;
- case QUIT:
- glutLeaveMainLoop();
- return;
- break;
- case QUIT_ERROR:
- glutLeaveMainLoop();
- return;
- break;
- }
-
if (options.draw_graphics == false)
return;
{
if (theKey == 'x' || theKey == 'X')
{
- glutLeaveMainLoop();
+ QuitProgram(false);
return;
}