From 8ab1e470217ff4955fb14920c0e3b2b15e230f18 Mon Sep 17 00:00:00 2001 From: curt Date: Sun, 25 Apr 2004 02:17:03 +0000 Subject: [PATCH] Hook in the fgOSExit() function. --- src/Main/fg_os.cxx | 5 +++++ src/Main/fg_os.hxx | 1 + src/Main/main.cxx | 1 + 3 files changed, 7 insertions(+) diff --git a/src/Main/fg_os.cxx b/src/Main/fg_os.cxx index e7a86d81f..beaea1bee 100644 --- a/src/Main/fg_os.cxx +++ b/src/Main/fg_os.cxx @@ -139,6 +139,11 @@ void fgOSMainLoop() glutMainLoop(); } +void fgOSExit(int code) +{ + exit(code); +} + static int CurrentCursor = MOUSE_CURSOR_POINTER; int fgGetMouseCursor() diff --git a/src/Main/fg_os.hxx b/src/Main/fg_os.hxx index dfe26f426..5b5df9c39 100644 --- a/src/Main/fg_os.hxx +++ b/src/Main/fg_os.hxx @@ -46,6 +46,7 @@ void fgOSOpenWindow(int w, int h, int bpp, bool alpha, bool stencil, bool fullscreen); void fgOSFullScreen(); void fgOSMainLoop(); +void fgOSExit(int code); void fgSetMouseCursor(int cursor); int fgGetMouseCursor(); diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 3d9fc2c53..00ca95f19 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -1447,6 +1447,7 @@ void fgReshape( int width, int height ) { // which happens in the sound manager destructor. void fgExitCleanup() { delete globals; + fgOSExit(0); }