cleanup now exits
This commit is contained in:
parent
1786b8b3ae
commit
a36ead2ceb
@ -179,6 +179,7 @@ static void cleanup(void) {
|
||||
glDeleteLists(gear2, 1);
|
||||
glDeleteLists(gear3, 1);
|
||||
glutDestroyWindow(win);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void draw(void) {
|
||||
@ -224,10 +225,7 @@ static void draw(void) {
|
||||
fflush(stdout);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
if ((t >= 999.0 * autoexit) && (autoexit)) {
|
||||
cleanup();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if ((t >= 999.0 * autoexit) && (autoexit)) cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,8 +270,6 @@ static void key(unsigned char k, int, int) {
|
||||
break;
|
||||
case 27: /* Escape */
|
||||
cleanup();
|
||||
exit(EXIT_SUCCESS);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user