From a36ead2ceb9a75c7703935f0aec7efd4a765a066 Mon Sep 17 00:00:00 2001 From: Lexxy Fox Date: Wed, 1 Nov 2023 16:04:30 -0500 Subject: [PATCH] cleanup now exits --- glxgears.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/glxgears.c b/glxgears.c index 76b55f8..3c6af3b 100644 --- a/glxgears.c +++ b/glxgears.c @@ -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; }