git.ucc.asn.au
/
matches
/
honours.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Parallel Programming - Trivial
[matches/honours.git]
/
course
/
semester2
/
pprog
/
assignment1
/
single-thread
/
graphics.c
diff --git
a/course/semester2/pprog/assignment1/single-thread/graphics.c
b/course/semester2/pprog/assignment1/single-thread/graphics.c
index
1b4fcb3
..
7a7d213
100644
(file)
--- a/
course/semester2/pprog/assignment1/single-thread/graphics.c
+++ b/
course/semester2/pprog/assignment1/single-thread/graphics.c
@@
-110,34
+110,17
@@
void Graphics_Display()
//Check whether the program should quit due to steps being computed, or a timeout
if (ExitCondition())
{
//Check whether the program should quit due to steps being computed, or a timeout
if (ExitCondition())
{
- glutLeaveMainLoop();
+ //printf("Leave graphics loop\n");
+ glutLeaveMainLoop();
return;
}
return;
}
-
#ifdef SINGLE_THREADED
if (options.verbosity != 0 && universe.steps % options.verbosity == 1)
DisplayStatistics();
System_Compute(&universe);
#endif
#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 (options.draw_graphics == false)
return;
@@
-170,7
+153,7
@@
void Graphics_Keyboard(unsigned char theKey, int mouseX, int mouseY)
{
if (theKey == 'x' || theKey == 'X')
{
{
if (theKey == 'x' || theKey == 'X')
{
-
glutLeaveMainLoop(
);
+
QuitProgram(false
);
return;
}
return;
}
UCC
git Repository :: git.ucc.asn.au