]> git.mxchange.org Git - flightgear.git/commitdiff
another signal for listener callback functions:
authormfranz <mfranz>
Sun, 29 Jan 2006 20:11:10 +0000 (20:11 +0000)
committermfranz <mfranz>
Sun, 29 Jan 2006 20:11:10 +0000 (20:11 +0000)
setlistener("/sim/signals/quit", func { print("I'm called on exit.")});

src/Main/fg_commands.cxx

index 2c2e90df30b8a7fa2cc15648069a26c63f74b2dc..4097da79049996f1e9d9b7f858ee2451ba0b182c 100644 (file)
@@ -192,6 +192,7 @@ static bool
 do_exit (const SGPropertyNode * arg)
 {
     SG_LOG(SG_INPUT, SG_INFO, "Program exit requested.");
+    fgSetBool("/sim/signals/quit", true);
 
     if (fgGetBool("/sim/startup/save-on-exit")) {
 #ifdef _MSC_VER