From c17c3595c803413952a9013495e1ff59f51b0a39 Mon Sep 17 00:00:00 2001
From: Erik Hofman <erik@ehofman.com>
Date: Thu, 21 Jul 2016 13:55:31 +0200
Subject: [PATCH] Set /sim/rendering/initialized to true at the appropriate
 moment and use it instead of /sim/initialized for the messagebox

---
 src/GUI/MessageBox.cxx | 4 ++--
 src/Main/main.cxx      | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/GUI/MessageBox.cxx b/src/GUI/MessageBox.cxx
index 846752af8..67276448a 100644
--- a/src/GUI/MessageBox.cxx
+++ b/src/GUI/MessageBox.cxx
@@ -134,7 +134,7 @@ MessageBoxResult modalMessageBox(const std::string& caption,
         s += "\n( " +  moreText + ")";
     }
 
-    if (fgGetBool("/sim/initialized", false) == false) {
+    if (fgGetBool("/sim/rendering/initialized", false) == false) {
         SG_LOG(SG_GENERAL, SG_ALERT, s);
     } else {
         NewGUI* _gui = (NewGUI *)globals->get_subsystem("gui");
@@ -161,7 +161,7 @@ MessageBoxResult fatalMessageBox(const std::string& caption,
     if (!moreText.empty()) {
         s += "\n( " +  moreText + ")";
     }
-    if (fgGetBool("/sim/initialized", false) == false) {
+    if (fgGetBool("/sim/rendering/initialized", false) == false) {
         std::cerr << s << std::endl;
     } else {
         NewGUI* _gui = (NewGUI *)globals->get_subsystem("gui");
diff --git a/src/Main/main.cxx b/src/Main/main.cxx
index d66d8adfe..b001a2d64 100644
--- a/src/Main/main.cxx
+++ b/src/Main/main.cxx
@@ -256,6 +256,7 @@ static void fgIdleFunction ( void ) {
             fgSetVideoOptions();
             idle_state+=2;
             fgSplashProgress("loading-aircraft-list");
+            fgSetBool("/sim/rendering/initialized", true);
         }
 
     } else if ( idle_state == 2 ) {